import { X as m, av as c, U as n, F as f, aa as $, ac as g, Y as b, bL as v, cT as x, bS as k, d0 as w } from "./603b75d9.js";
import { RadioChildrenMap as C, RadioPropertyView as d } from "./a4d0e31e.js";
import { useSelectInputValidate as B, selectDivRefMethods as R, SelectInputInvalidConfig as I } from "./00d44232.js";
import "react";
import { fixOldInputCompData as D } from "./41aba172.js";
import "react-dom";
import "./f9847c56.js";
const T = (o, a) => c`
    .ant-radio-wrapper:not(.ant-radio-wrapper-disabled) {
      color: ${a == null ? void 0 : a.staticText};
      // height: 22px;
      max-width: calc(100% - 8px);
      padding: ${a == null ? void 0 : a.padding};
      span:not(.ant-radio) {
        ${x};
        font-family:${a == null ? void 0 : a.fontFamily};
        font-size:${a == null ? void 0 : a.textSize};
        font-weight:${a == null ? void 0 : a.textWeight};
        font-style:${a == null ? void 0 : a.fontStyle};
        text-transform:${a == null ? void 0 : a.textTransform};
        text-decoration:${a == null ? void 0 : a.textDecoration};
      }

      .ant-radio-checked {
        .ant-radio-inner {
          background-color: ${a == null ? void 0 : a.checkedBackground};
          border-color: ${a == null ? void 0 : a.uncheckedBorder};
        }

        &::after {
          border-color: ${a == null ? void 0 : a.uncheckedBorder};
        }
      }

      .ant-radio-inner {
        background-color: ${a == null ? void 0 : a.uncheckedBackground};
        border-color: ${a == null ? void 0 : a.uncheckedBorder};
        border-width:${a == null ? void 0 : a.borderWidth};
        &::after {
          background-color: ${a == null ? void 0 : a.checked};
        }
      }

      &:hover .ant-radio-inner, 
      .ant-radio:hover .ant-radio-inner,
      .ant-radio-input + ant-radio-inner {
        ${(a == null ? void 0 : a.hoverBackground) && `background-color: ${o.hoverBackground}`};
      }

      &:hover .ant-radio-inner,
      .ant-radio:hover .ant-radio-inner,
      .ant-radio-input:focus + .ant-radio-inner {
        border-color: ${a == null ? void 0 : a.uncheckedBorder};
      }
    }
  `, z = m(w)`
  width: 100%;
  min-height: 32px;

  ${(o) => o.$style && T(o.$style, o.$inputFieldStyle)}
  ${(o) => {
  if (o.$layout === "horizontal")
    return c`
        display: flex;
        align-items: center;
        flex-wrap: wrap;
      `;
  if (o.$layout === "vertical")
    return c`
        display: flex;
        flex-direction: column;
      `;
  if (o.$layout === "auto_columns")
    return c`
        break-inside: avoid;
        columns: 160px;
      `;
}}
`;
let s = function() {
  return new n(C, (o) => {
    const [a, h] = B(o);
    return o.label({
      required: o.required,
      style: o.style,
      labelStyle: o.labelStyle,
      inputFieldStyle: o.inputFieldStyle,
      animationStyle: o.animationStyle,
      children: /* @__PURE__ */ f(z, {
        ref: o.viewRef,
        disabled: o.disabled,
        value: o.value.value,
        $style: o.style,
        $inputFieldStyle: o.inputFieldStyle,
        $layout: o.layout,
        onChange: (r) => {
          h(r.target.value);
        },
        options: o.options.filter((r) => r.value !== void 0 && !r.hidden).map((r) => ({
          label: r.label,
          value: r.value,
          disabled: r.disabled
        }))
      }),
      ...a
    });
  }).setPropertyViewFn((o) => /* @__PURE__ */ f(d, {
    ...o
  })).setExposeMethodConfigs(R).build();
}();
s = k(s, D);
const P = $(s, [new g("value", b("selectInput.valueDesc")), I, ...v]);
export {
  P as RadioComp
};
