import{LitElement as e,html as s,css as t}from"../../../lit/index.js";import{SimpleFieldsFormLite as i}from"./simple-fields-form-lite.js";import{SimpleFields as o}from"../simple-fields.js";class SimpleFieldsForm extends i{static get tag(){return"simple-fields-form"}render(){return s`
      <form part="form">
        <slot name="before"></slot>
        <simple-fields
          id="sf"
          .autofocus="${!this.disableAutofocus}"
          ?watchColorPrefs="${this.watchColorPrefs}"
          language="${this.language||""}"
          .resources="${this.resources}"
          .schema="${this.schema}"
          .fields="${this.fields}"
          .schematizer="${this.fieldsConversion}"
          .elementizer="${this.elementizer}"
          .value="${this.value}"
          @value-changed="${this._valueChanged}"
          part="fields"
        >
        </simple-fields>
        <slot></slot>
      </form>
    `}_applyLoadedData(){this.loadResponse.data.schema?this.schema=this.loadResponse.data.schema:this.loadResponse.data.fields&&(this.fields=this.loadResponse.data.fields),this.loadResponse.data.value&&(this.value=this.loadResponse.data.value)}static get fieldProperties(){return{...super.fieldProperties,fields:{type:"Array"},fieldsConversion:{type:"Object",attribute:"fields-conversion"}}}rebuildForm(){this.shadowRoot.querySelector("#sf")&&this.shadowRoot.querySelector("#sf").rebuidForm()}get defaultSchemaConversion(){return o.defaultSchemaConversion}}customElements.define(SimpleFieldsForm.tag,SimpleFieldsForm);export{SimpleFieldsForm};