"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),helpers=require("../../../helpers.js"),system=require("@gem-sdk/system"),styles=require("./common/styles.js"),classes=require("./common/classes.js");const FromCheckbox=({builderProps:e,setting:s,advanced:t,pageContext:l,styles:o})=>{let{name:c,description:r,selected:a,required:m,translate:y}=s??{},i=helpers.getDynamicSourceLocales({val:r,uid:e?.uid,settingId:"description",pageContext:l,translate:y}),p=system.createStyle(styles.composeContainerStyles(s)),n=system.createStyle(styles.composeFormCheckboxStyles(s,o,e)),u=system.createStyle(styles.composeFormCheckboxInputStyles()),d=system.createStyle(styles.getComposedTextStyle(s)),C=system.createClass(classes.composeContainerClasses(s,t,e)),$=system.createClass(classes.composeFormCheckboxInputClasses()),b=system.createClass(classes.composeFormCheckboxLabelClasses());return core.template`
    <div
      data-id="${e?.uid}"
      style="${p}"
    >
      <label
        style="${n}"
        class="${C}"
      >
        <input
          class="${$}"
          name="${c}"
          type="checkbox"
          ${system.If(a,"checked")}
          ${system.If(m,"required")}
          style="${u}"
        >
        </input>
        <span class="${b}" style="${d}">
          ${i}
        </span>
      </label>
    </div>
  `};exports.default=FromCheckbox;
