import { DeesElement, property, html, customElement, type TemplateResult, state } from '@design.estate/dees-element'; import { WccDashboard } from './wcc-dashboard.js'; import type { TTemplateFactory } from './wcctools.helpers.js'; import './wcc-record-button.js'; import './wcc-recording-panel.js'; export type TPropertyType = 'String' | 'Number' | 'Boolean' | 'Object' | 'Enum' | 'Array'; export type TEnvironment = 'native' | 'desktop' | 'tablet' | 'phablet' | 'phone'; export type TTheme = 'bright' | 'dark'; let environment: TEnvironment = 'native'; export const setEnvironment = (envArg) => { environment = envArg; }; @customElement('wcc-properties') export class WccProperties extends DeesElement { @property({ type: WccDashboard }) accessor dashboardRef: WccDashboard; @property() accessor selectedItem: TTemplateFactory | DeesElement; @property() accessor selectedViewport: TEnvironment = 'native'; @property() accessor selectedTheme: TTheme = 'dark'; @property() accessor warning: string = null; @property() accessor isFullscreen: boolean = false; @state() accessor propertyContent: TemplateResult[] = []; @state() accessor editingProperties: Array<{ id: string; name: string; value: any; element: HTMLElement; editorValue: string; editorError: string; }> = []; // Recording coordination state @state() accessor showRecordingPanel: boolean = false; @state() accessor isRecording: boolean = false; @state() accessor recordingDuration: number = 0; public editorHeight: number = 300; public render(): TemplateResult { return html` ${this.editingProperties.length > 0 ? html`