import { av as n, cT as b, cU as c, X as u, cV as d, P as k, bI as x, cW as f, cX as $, Z as a, c2 as m, c3 as s, a3 as g, N as v, cY as p, az as C, U as S, F as i, aa as w, ac as B, Y as W, bL as I, bS as F, cZ as V } from "./603b75d9.js";
import { SelectInputValidationChildren as D, useSelectInputValidate as E, selectDivRefMethods as R, SelectInputInvalidConfig as z } from "./00d44232.js";
import { formDataChildren as L } from "./f9847c56.js";
import { RadioPropertyView as O, RadioLayoutOptions as T } from "./a4d0e31e.js";
import "react";
import { fixOldInputCompData as y } from "./41aba172.js";
import "react-dom";
const M = (e) => n`
    .ant-checkbox-wrapper:not(.ant-checkbox-wrapper-disabled) {
      color: ${e.staticText};
      max-width: calc(100% - 8px);

      span:not(.ant-checkbox) {
        ${b};
      }

      .ant-checkbox .ant-checkbox-checked > .ant-checkbox-inner {
        border-color: ${e.checkedBorder};
        border-width:${e.borderWidth ? e.borderWidth : "2px"};
      }

      .ant-checkbox:not(.ant-checkbox-checked) > .ant-checkbox-inner{
        border-color: ${e.uncheckedBorder};
        border-width:${e.borderWidth ? e.borderWidth : "2px"};
      }

      .ant-checkbox-checked:not(.ant-checkbox-disabled) {
        .ant-checkbox-inner {
          background-color: ${e.checkedBackground};
          border-color: ${e.checkedBorder};
          border-width:${e.borderWidth ? e.borderWidth : "2px"};

          &::after {
            border-color: ${e.checked};
          }
        }

        &::after {
          border-color: ${e.checkedBorder};
          border-width:${e.borderWidth ? e.borderWidth : "2px"};
          border-radius: ${e.radius};
        }
      }
      
      .ant-checkbox-inner) {
        background-color: ${e.uncheckedBackground};
        border-radius: ${e.radius};
        border-color: ${e.checkedBorder};
        border-width:${e.borderWidth ? e.borderWidth : "2px"};
      }
    
      &:hover .ant-checkbox-inner, 
      .ant-checkbox:hover .ant-checkbox-inner,
      .ant-checkbox-input + ant-checkbox-inner {
        ${e.hoverBackground && `background-color: ${e.hoverBackground}`};
        ${e.hoverBackground && `border-color: ${e.hoverBackground}`};
      }

      

      &:hover .ant-checkbox-inner,
      .ant-checkbox:hover .ant-checkbox-inner,
      .ant-checkbox-input:focus + .ant-checkbox-inner {
        border-color: ${e.checkedBorder};
        border-width:${e.borderWidth ? e.borderWidth : "2px"};
      }

      &:hover .ant-checkbox-checked:not(.ant-checkbox-disabled) .ant-checkbox-inner {
        background-color: ${e.hoverBackground || c(e.checkedBackground, 0.1)};
        border-color: ${e.hoverBackground || c(e.checkedBackground, 0.1)};
      }
    }

    

    .ant-checkbox-group-item {
      font-family:${e.fontFamily};
      font-size:${e.textSize};
      font-weight:${e.textWeight};
      font-style:${e.fontStyle};
      text-transform:${e.textTransform};
      text-decoration:${e.textDecoration};
    }
    .ant-checkbox-wrapper {
      padding: ${e.padding};
      .ant-checkbox-inner,
      .ant-checkbox-checked::after {
        border-radius: ${e.radius};
      }
    }
  `, N = u(V)`
  min-height: 32px;
  ${(e) => e.$style && M(e.$style)}
  ${(e) => {
  if (e.$layout === "horizontal")
    return n`
        display: flex;
        align-items: center;
        flex-wrap: wrap;
      `;
  if (e.$layout === "vertical")
    return n`
        display: flex;
        flex-direction: column;
      `;
  if (e.$layout === "auto_columns")
    return n`
        break-inside: avoid;
        columns: 160px;
      `;
}}
`;
let t = function() {
  const e = {
    defaultValue: d("defaultValue"),
    value: d("value"),
    label: k,
    disabled: x,
    onEvent: f,
    options: $,
    style: a(m, "style"),
    labelStyle: a(s.filter((o) => ["accent", "validate", "lineheight"].includes(o.name) === !1), "labelStyle"),
    layout: g(T, "horizontal"),
    viewRef: v,
    inputFieldStyle: a(p, "inputFieldStyle"),
    animationStyle: a(C, "animationStyle"),
    ...D,
    ...L
  };
  return new S(e, (o) => {
    const [l, h] = E(o);
    return o.label({
      required: o.required,
      style: o.style,
      labelStyle: o.labelStyle,
      inputFieldStyle: o.inputFieldStyle,
      animationStyle: o.animationStyle,
      children: /* @__PURE__ */ i(N, {
        ref: o.viewRef,
        disabled: o.disabled,
        value: o.value.value,
        $style: o.inputFieldStyle,
        $layout: o.layout,
        options: o.options.filter((r) => r.value !== void 0 && !r.hidden).map((r) => ({
          label: r.label,
          value: r.value,
          disabled: r.disabled
        })),
        onChange: (r) => {
          h(r);
        }
      }),
      ...l
    });
  }).setPropertyViewFn((o) => /* @__PURE__ */ i(O, {
    ...o
  })).setExposeMethodConfigs(R).build();
}();
t = F(t, y);
const Z = w(t, [new B("value", W("selectInput.valueDesc")), z, ...I]);
export {
  Z as CheckboxComp,
  M as getStyle
};
