import { r as s, c, h as i, H as l } from "./index.61732cef.js";
import { c as t } from "./index-orsBiyT_.fc4357c3.js";
import "react";
import "react-dom";
const n = () => '.sc-swirl-radio-h{display:inline-flex}.sc-swirl-radio-h *.sc-swirl-radio{box-sizing:border-box}.radio.sc-swirl-radio{display:inline-flex;line-height:var(--s-line-height-base);cursor:pointer;align-items:center}.radio.sc-swirl-radio:focus-within .radio__box.sc-swirl-radio{box-shadow:0 0 0 0.0625rem var(--s-background-default),       0 0 0 0.1875rem var(--s-focus-default)}.radio--variant-card.sc-swirl-radio{width:100%;padding:var(--s-space-16);border:0.0625rem solid var(--s-border-default);border-radius:var(--s-border-radius-sm);background-color:var(--s-surface)}.radio--variant-card.sc-swirl-radio:focus-within{box-shadow:0 0 0 0.125rem var(--s-background-default),       0 0 0 0.25rem var(--s-focus-default)}.radio--variant-card.sc-swirl-radio:focus-within .radio__box.sc-swirl-radio{box-shadow:none}.radio--variant-card.sc-swirl-radio:hover:not(.radio--disabled){background-color:var(--s-state-hovered)}.radio--variant-card.sc-swirl-radio:active:not(.radio--disabled){background-color:var(--s-state-pressed)}.radio--variant-card.radio--checked.sc-swirl-radio:not(.radio--disabled){border-color:var(--s-border-highlight)}.radio--variant-card.radio--invalid.sc-swirl-radio:not(.radio--disabled){border-color:var(--s-border-critical)}.radio--checked.sc-swirl-radio .radio__control.sc-swirl-radio:hover .radio__box.sc-swirl-radio{border-color:var(--s-interactive-primary-hovered);background-color:var(--s-interactive-primary-hovered)}.radio--checked.sc-swirl-radio .radio__box.sc-swirl-radio{position:relative;border-color:var(--s-icon-highlight);background-color:var(--s-icon-highlight)}.radio--checked.sc-swirl-radio .radio__box.sc-swirl-radio:after{position:absolute;top:50%;left:50%;width:0.5rem;height:0.5rem;border-radius:50%;background-color:var(--s-background-default);content:"";transform:translate3d(-50%, -50%, 0)}.radio--invalid.radio--checked.sc-swirl-radio .radio__box.sc-swirl-radio,.radio--invalid.radio--indeterminate.sc-swirl-radio .radio__box.sc-swirl-radio{background-color:var(--s-icon-critical)}.radio--invalid.sc-swirl-radio .radio__box.sc-swirl-radio{border-color:var(--s-icon-critical)}.radio--disabled.sc-swirl-radio{cursor:default}.radio--disabled.radio--checked.sc-swirl-radio .radio__control.sc-swirl-radio:hover .radio__box.sc-swirl-radio{border-color:var(--s-icon-disabled);background-color:transparent}.radio--disabled.radio--checked.sc-swirl-radio .radio__box.sc-swirl-radio{border-color:var(--s-icon-disabled);background-color:var(--s-background-default)}.radio--disabled.radio--checked.sc-swirl-radio .radio__box.sc-swirl-radio:after{background-color:var(--s-icon-disabled)}.radio--disabled.sc-swirl-radio .radio__control.sc-swirl-radio:hover .radio__box.sc-swirl-radio{background-color:transparent}.radio--disabled.sc-swirl-radio .radio__box.sc-swirl-radio{border-color:var(--s-icon-disabled)}.radio--disabled.sc-swirl-radio .radio__description.sc-swirl-radio,.radio--disabled.sc-swirl-radio .radio__label.sc-swirl-radio{color:var(--s-text-disabled)}.radio__control.sc-swirl-radio{position:relative;display:inline-flex;width:1.5rem;height:1.5rem;padding:var(--s-space-2);flex-shrink:0}.radio__control.sc-swirl-radio:hover .radio__box.sc-swirl-radio{background-color:var(--s-action-neutral-hovered)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.radio__control.sc-swirl-radio{width:1.375rem;height:1.375rem}}.radio__box.sc-swirl-radio{position:relative;display:flex;width:100%;height:100%;justify-content:center;align-items:center;border:0.125rem solid var(--s-icon-default);border-radius:50%}.radio__label-container.sc-swirl-radio{display:inline-flex;margin-left:var(--s-space-8);padding-top:var(--s-space-2);flex-direction:column}.radio__label.sc-swirl-radio{display:flex;align-items:center;font-weight:var(--s-font-weight-medium);gap:var(--s-space-8)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.radio__label.sc-swirl-radio{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.radio__description.sc-swirl-radio{color:var(--s-text-subdued)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.radio__description.sc-swirl-radio{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}', h = class {
  constructor(r) {
    s(this, r), this.valueChange = c(this, "valueChange", 7), this.checked = !1, this.disabled = !1, this.variant = "default", this.onChange = () => {
      this.checked = !0, this.valueChange.emit(this.value);
    };
  }
  getAriaCheckedLabel(r, a) {
    return r ? "true" : a ? "false" : "mixed";
  }
  render() {
    const r = this.checked === !1 || this.checked === "false", a = this.checked === !0 || this.checked === "true", d = this.getAriaCheckedLabel(a, r), o = this.invalid, e = t("radio", `radio--variant-${this.variant}`, {
      "radio--checked": a,
      "radio--disabled": this.disabled,
      "radio--invalid": this.invalid,
      "radio--unchecked": r
    });
    return i(l, { key: "6ae2ed2df56b3c1d7cb34e86e4fa2a62563ab95d", style: { width: this.variant === "card" ? "100%" : void 0 } }, i("label", { key: "4e27fba290d056a9654c0c14e4e3b3506324756f", class: e, htmlFor: this.inputId }, i("span", { key: "2deafc430b2b40dfafb863a017d01acd6d6b77ab", class: "radio__control" }, i("swirl-visually-hidden", { key: "32e6d78b1723fb17b98e882e1d49c8994e0b63d0" }, i("input", { key: "21b7fff70e84dbd228f88305924b8b29b5e58089", "aria-checked": d, "aria-invalid": o, checked: a, class: "radio__input", disabled: this.disabled, id: this.inputId, name: this.inputName, onChange: this.onChange, type: "radio", value: this.value })), i("span", { key: "e1f9252ef9c7460bf9d0689b7db2b6eb3359583a", "aria-hidden": "true", class: "radio__box" })), i("span", { key: "7323db066e679a7cb6d1c0e3518fbf94afff5170", class: "radio__label-container" }, this.label && i("span", { key: "c7539cbc3ffcd027a3481c0fd4679774b78f79c7", class: "radio__label" }, this.label, this.tooltip && i("swirl-tooltip", { key: "c3621889d24d7b37edfe41493be5d4b84f2790e6", content: this.tooltip, position: "top" }, i("swirl-icon-help", { key: "3528944b98e966a4b2fb0053605d7bafcc49c697", color: "default", size: 20, tabIndex: 0 }))), this.description && i("span", { key: "9557a2966076d4bb33235a1ff6080d8ecf37b51d", class: "radio__description", innerHTML: this.description }))));
  }
};
h.style = n();
export {
  h as swirl_radio
};
