import{template as e}from"@gem-sdk/core";import{getDynamicSourceLocales as s,createSettingId as t}from"../../../helpers.js";import{createStyle as o,createClass as r,If as m}from"@gem-sdk/system";import{composeContainerStyles as i,composeFormCheckboxStyles as l,composeFormCheckboxInputStyles as a,getComposedTextStyle as c}from"./common/styles.js";import{composeContainerClasses as d,composeFormCheckboxInputClasses as p,composeFormCheckboxLabelClasses as n}from"./common/classes.js";import{FormCheckbox as $}from"../../settings/form-checkbox/configs/translate.js";let FromCheckbox=({builderProps:f,setting:u,advanced:k,pageContext:y,styles:b})=>{let{name:g,description:h,selected:x,required:j}=u??{},v=s({val:h,uid:f?.uid,settingId:t({id:$?.description?.id}),pageContext:y??{}}),C=o(i(u)),F=o(l(u,b,f)),q=o(a()),I=o(c(u)),w=r(d(u,k,f)),z=r(p()),A=r(n());return e`
    <div
      data-id="${f?.uid}"
      style="${C}"
    >
      <label
        style="${F}"
        class="${w}"
      >
        <input
          class="${z}"
          name="${g}"
          type="checkbox"
          ${m(x,"checked")}
          ${m(j,"required")}
          style="${q}"
        >
        </input>
        <span class="${A}" style="${I}">
          ${v}
        </span>
      </label>
    </div>
  `};export{FromCheckbox as default};
