import { co as r, cI as b, b9 as h, cJ as t, bK as u, bd as x, cK as k, cL as f, bB as c, cM as s, bO as m, bb as $, bf as g, U as p, V as i, bn as v, bo as C, a0 as w, bp as S, cN as B, bA as I } from "./684d2f28.js";
import { SelectInputValidationChildren as W, useSelectInputValidate as V, selectDivRefMethods as D, SelectInputInvalidConfig as E } from "./1312a48b.js";
import { formDataChildren as R } from "./00dac55d.js";
import { RadioLayoutOptions as O, RadioPropertyView as z } from "./622ce240.js";
import "react";
import { fixOldInputCompData as L } from "./0c4ef413.js";
import "react-dom";
import "./d6402597.js";
const M = (e) => r`
    &,
    .ant-checkbox-wrapper:not(.ant-checkbox-wrapper-disabled) {
      color: ${e.staticText};
      max-width: calc(100% - 8px);

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

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

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

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

      &:hover .ant-checkbox-checked .ant-checkbox-inner, 
      .ant-checkbox:hover .ant-checkbox-inner,
      .ant-checkbox-input + ant-checkbox-inner {
        background-color:${e.hoverBackground ? e.hoverBackground : "#ffff"};
      }

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

    

    .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 = h(B)`
  min-height: 32px;
  ${(e) => e.$style && M(e.$style)}
  ${(e) => {
  if (e.$layout === "horizontal")
    return r`
        display: flex;
        align-items: center;
        flex-wrap: wrap;
      `;
  if (e.$layout === "vertical")
    return r`
        display: flex;
        flex-direction: column;
      `;
  if (e.$layout === "auto_columns")
    return r`
        break-inside: avoid;
        columns: 160px;
      `;
}}
`;
let n = function() {
  const e = {
    defaultValue: t("defaultValue"),
    value: t("value"),
    label: u,
    disabled: x,
    onEvent: k,
    options: f,
    style: c(s),
    labelStyle: c(m.filter((o) => ["accent", "validate"].includes(o.name) === !1)),
    layout: $(O, "horizontal"),
    viewRef: g,
    ...W,
    ...R
  };
  return new p(e, (o) => {
    const [d, l] = V(o);
    return o.label({
      required: o.required,
      style: o.style,
      labelStyle: o.labelStyle,
      children: /* @__PURE__ */ i(N, {
        ref: o.viewRef,
        disabled: o.disabled,
        value: o.value.value,
        $style: o.style,
        $layout: o.layout,
        options: o.options.filter((a) => a.value !== void 0 && !a.hidden).map((a) => ({
          label: a.label,
          value: a.value,
          disabled: a.disabled
        })),
        onChange: (a) => {
          l(a);
        }
      }),
      ...d
    });
  }).setPropertyViewFn((o) => /* @__PURE__ */ i(z, {
    ...o
  })).setExposeMethodConfigs(D).build();
}();
n = I(n, L);
const j = v(n, [new C("value", w("selectInput.valueDesc")), E, ...S]);
export {
  j as CheckboxComp,
  M as getStyle
};
