"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"),translate=require("../../settings/form-checkbox/configs/translate.js");const FromCheckbox=({builderProps:e,setting:s,advanced:t,pageContext:l,styles:r})=>{let{name:o,description:c,selected:a,required:m}=s??{},y=helpers.getDynamicSourceLocales({val:c,uid:e?.uid,settingId:helpers.createSettingId({id:translate.FormCheckbox?.description?.id}),pageContext:l??{}}),i=system.createStyle(styles.composeContainerStyles(s)),n=system.createStyle(styles.composeFormCheckboxStyles(s,r,e)),p=system.createStyle(styles.composeFormCheckboxInputStyles()),d=system.createStyle(styles.getComposedTextStyle(s)),u=system.createClass(classes.composeContainerClasses(s,t,e)),C=system.createClass(classes.composeFormCheckboxInputClasses()),h=system.createClass(classes.composeFormCheckboxLabelClasses());return core.template`
    <div
      data-id="${e?.uid}"
      style="${i}"
    >
      <label
        style="${n}"
        class="${u}"
      >
        <input
          class="${C}"
          name="${o}"
          type="checkbox"
          ${system.If(a,"checked")}
          ${system.If(m,"required")}
          style="${p}"
        >
        </input>
        <span class="${h}" style="${d}">
          ${y}
        </span>
      </label>
    </div>
  `};exports.default=FromCheckbox;
