import { html, LitElement } from "lit" import { customElement, property } from "lit/decorators.js" //import { baseStyling } from "../../styling/base.js" import "./string/string-input.js" import "./array/array-input.js" import "./object/object-input.js" import "./union/path-pattern-input.js" @customElement("general-input") export class GeneralInput extends LitElement { //static override styles = baseStyling @property() property: string = "" @property() moduleId?: string @property() modules?: Array @property() value: string = "" @property() schema: any = {} @property() required: any = {} @property() handleInlangProjectChange: (value: string, key: string, moduleId?: string) => void = () => {} override render() { if (this.schema.type) { if (this.schema.type === "string") { return html`
` } else if (this.schema.type === "array") { return html`
` } else if (this.schema.type === "object") { return html`
` } else { return html`
` } } else if (this.property === "pathPattern" || this.property === "sourceLanguageFilePath") { return html`
` } else { return html`
` } } } // add types declare global { interface HTMLElementTagNameMap { "general-input": GeneralInput } }