import{LitElement as e,html as t,css as i}from"../../../lit/index.js";import{SimpleFieldsBaseStyles as l,SimpleFieldsFieldsetStyles as s,SimpleFieldsDescriptionStyles as r}from"./simple-fields-ui.js";const SimpleFieldsFieldsetBehaviors=function(e){return class extends e{constructor(){super(),this.isSimpleFieldType=!0}static get tag(){return"simple-fields-fieldset"}static get styles(){return[...l,...s,...r,i`
          :host(:last-of-type) {
            margin-bottom: 0;
          }
        `]}render(){return t`
        <fieldset part="fieldset">
          ${this.legend} ${this.desc} ${this.fields}
        </fieldset>
      `}get legend(){return t`
        <legend id="label" ?hidden="${!this.label}" part="legend">
          ${this.label}${this.error?"*":""}
        </legend>
      `}get desc(){return t`
        <div id="description" ?hidden="${!this.description}" part="description">
          ${this.description}
        </div>
      `}get fields(){return t`
        <div
          id="item-fields"
          part="fields"
          exportparts="option, option-inner, option-label, option-input"
        >
          <slot></slot>
        </div>
      `}static get properties(){return{disabled:{type:Boolean,reflect:!0},isSimpleFieldType:{type:Boolean,reflect:!0,attribute:"is-simple-field-type"},error:{type:Boolean,reflect:!0},hidden:{type:Boolean,reflect:!0},inline:{type:Boolean,reflect:!0},readonly:{type:Boolean,reflect:!0},label:{type:String,reflect:!0},name:{type:String,reflect:!0,attribute:"name"},description:{type:String}}}}};class SimpleFieldsFieldset extends(SimpleFieldsFieldsetBehaviors(e)){}customElements.define(SimpleFieldsFieldset.tag,SimpleFieldsFieldset);export{SimpleFieldsFieldset,SimpleFieldsFieldsetBehaviors};