import { b9 as d, co as o, U as l, V as t, bn as c, bo as u, a0 as f, bp as h, cI as m, cP as s, bA as g } from "./684d2f28.js";
import { RadioChildrenMap as b, RadioPropertyView as $ } from "./622ce240.js";
import { useSelectInputValidate as v, selectDivRefMethods as x, SelectInputInvalidConfig as k } from "./1312a48b.js";
import "react";
import { fixOldInputCompData as p } from "./0c4ef413.js";
import "react-dom";
import "./00dac55d.js";
import "./d6402597.js";
const w = (e) => o`
    .ant-radio-wrapper:not(.ant-radio-wrapper-disabled) {
      color: ${e.staticText};
      // height: 22px;
      max-width: calc(100% - 8px);
      padding: ${e.padding};
      span:not(.ant-radio) {
        ${m};
        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-radio-checked {
        .ant-radio-inner {
          background-color: ${e.checkedBackground};
          border-color: ${e.checkedBackground};
        }

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

      .ant-radio-inner {
        background-color: ${e.uncheckedBackground};
        border-color: ${e.uncheckedBorder};
        border-width:${e.borderWidth};
        &::after {
          background-color: ${e.checked};
        }
      }

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

      &:hover .ant-radio-inner,
      .ant-radio:hover .ant-radio-inner,
      .ant-radio-input:focus + .ant-radio-inner {
        border-color: ${e.checkedBackground};
      }
    }
  `, C = d(s)`
  width: 100%;
  min-height: 32px;

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