import { r as l, h as i, F as s, c as h, H as b, g as u } from "./index.61732cef.js";
import { c as r } from "./index-orsBiyT_.fc4357c3.js";
import { D as w } from "./media-query.service-CCYT6DU8.f0931fdc.js";
import { v as g } from "./v4-DD3477fe.2624487e.js";
import "react";
import "react-dom";
import "./utils-CCck-DTo.e4e43b6a.js";
const f = () => ":host{display:inline-flex;max-width:100%;max-height:100%}.swirl-icon{max-width:100%;max-height:100%}.icon-wrapper{display:inline-flex;justify-content:center;align-items:center;border-radius:var(--s-border-radius-full-round);background-color:var(--s-surface-raised-default)}.icon-wrapper--size-xs{width:16px;height:16px}.icon-wrapper--size-s{width:20px;height:20px}.icon-wrapper--size-m{width:24px;height:24px}.icon-wrapper--size-l{width:28px;height:28px}.icon-wrapper--size-xl{width:32px;height:32px}.icon-wrapper--size-2xl{width:40px;height:40px}.icon-wrapper--background-color-neutral{background-color:var(--s-surface-raised-default);color:var(--s-icon-default)}.icon-wrapper--background-color-banana{background-color:var(--s-decorative-banana-surface-subdued);color:var(--s-decorative-banana-text)}.icon-wrapper--background-color-blueberry{background-color:var(--s-decorative-blueberry-surface-subdued);color:var(--s-decorative-blueberry-text)}.icon-wrapper--background-color-chilli{background-color:var(--s-decorative-chilli-surface-subdued);color:var(--s-decorative-chilli-text)}.icon-wrapper--background-color-grape{background-color:var(--s-decorative-grape-surface-subdued);color:var(--s-decorative-grape-text)}.icon-wrapper--background-color-kiwi{background-color:var(--s-decorative-kiwi-surface-subdued);color:var(--s-decorative-kiwi-text)}.icon-wrapper--background-color-pumpkin{background-color:var(--s-decorative-pumpkin-surface-subdued);color:var(--s-decorative-pumpkin-text)}.icon-wrapper--background-color-radish{background-color:var(--s-decorative-radish-surface-subdued);color:var(--s-decorative-radish-text)}.icon-wrapper--background-color-default{background-color:var(--s-background-default);color:var(--s-icon-default)}", v = class {
  constructor(t) {
    l(this, t), this.size = 24;
  }
  render() {
    const t = this.size === 20 ? 24 : this.size, e = {
      color: Boolean(this.color) ? `var(--s-icon-${this.color})` : void 0
    }, o = r("swirl-icon", `swirl-icon--size-${this.size}`);
    return i("svg", { key: "6275cc4ab1affc53560b8330c9064a59d79e5103", "aria-hidden": "true", class: o, fill: "none", height: this.size, part: "icon", style: e, viewBox: `0 0 ${t} ${t}`, width: this.size, xmlns: "http://www.w3.org/2000/svg" }, this.size === 16 && i(s, { key: "15ee3ca1e6ff26cd92d5c88c2ae47ef0a8ea7725" }, i("path", { key: "7d54833fa0a7083064875dd720f8c103cad98190", "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M12.4142 4.91924C12.8047 5.30976 12.8047 5.94293 12.4142 6.33345L7.08086 11.6667C6.69033 12.0572 6.05717 12.0572 5.66664 11.6667L3.70711 9.70707C3.31658 9.31655 3.31658 8.68338 3.70711 8.29286C4.09763 7.90233 4.7308 7.90233 5.12132 8.29286L6.37375 9.54539L11 4.91924C11.3905 4.52871 12.0237 4.52871 12.4142 4.91924Z", fill: "currentColor" })), (this.size === 20 || this.size === 24) && i(s, { key: "1d8e59131cef7708459a4881a642b4320f61b40b" }, i("path", { key: "328398e287c6407ac841d8a342fa3496f8d121e3", "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M18.6213 7.37879C19.2071 7.96458 19.2071 8.91433 18.6213 9.50011L10.6213 17.5C10.0355 18.0858 9.08577 18.0858 8.49998 17.5L5.56068 14.5605C4.97489 13.9748 4.97489 13.025 5.56068 12.4392C6.14646 11.8534 7.09621 11.8534 7.682 12.4392L9.56064 14.318L16.5 7.37879C17.0858 6.79301 18.0355 6.79301 18.6213 7.37879Z", fill: "currentColor" })), this.size === 28 && i(s, { key: "ad8c14db6f9793718a33526e0467e7c25ae2dca9" }, i("path", { key: "3572cd8ac87e4c12c0642d2c05179e87238c1e61", "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M21.7248 8.60863C22.4083 9.29205 22.4083 10.4001 21.7248 11.0835L12.3915 20.4167C11.7081 21.1001 10.6001 21.1001 9.91663 20.4167L6.48744 16.9873C5.80403 16.3039 5.80403 15.1959 6.48744 14.5125C7.17086 13.8291 8.2789 13.8291 8.96232 14.5125L11.1541 16.7044L19.25 8.60863C19.9334 7.92521 21.0414 7.92521 21.7248 8.60863Z", fill: "currentColor" })));
  }
};
v.style = f();
const x = () => '.sc-swirl-option-list-item-h{position:relative;display:block;width:100%}.sc-swirl-option-list-item-h *.sc-swirl-option-list-item{box-sizing:border-box}.option-list-item--drag.sc-swirl-option-list-item-h{border-radius:var(--s-border-radius-s);background-color:var(--s-translucent-medium-pressed)}.option-list-item.sc-swirl-option-list-item{display:inline-flex;position:relative;width:100%;min-width:15rem;min-height:3rem;padding:var(--s-space-12) var(--s-space-16);border-radius:var(--s-border-radius-sm);align-items:center;background-color:transparent;cursor:pointer;gap:var(--s-space-12)}.option-list-item.sc-swirl-option-list-item:hover:not(.option-list-item--disabled){background-color:var(--s-state-hovered)}.option-list-item.sc-swirl-option-list-item:active:not(.option-list-item--disabled){background-color:var(--s-translucent-low-pressed)}.option-list-item.sc-swirl-option-list-item:focus{outline:none}.option-list-item.sc-swirl-option-list-item:focus-visible{background-color:var(--s-state-hovered);outline-color:var(--s-focus-default);outline-style:solid;outline-width:0.125rem;z-index:1}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item.sc-swirl-option-list-item{min-height:0;padding:var(--s-space-8) var(--s-space-12);gap:var(--s-space-8)}}.option-list-item--draggable.sc-swirl-option-list-item .option-list-item__label-container.sc-swirl-option-list-item{padding-right:calc(var(--s-space-16) + 1.5rem)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item--draggable.sc-swirl-option-list-item .option-list-item__label-container.sc-swirl-option-list-item{padding-right:calc(var(--s-space-16) + 1rem)}}.option-list-item--dragging.sc-swirl-option-list-item{z-index:1;border-radius:var(--s-border-radius-s);background-color:var(--s-translucent-low-pressed);box-shadow:0 0.0625rem 0.125rem rgba(25, 26, 28, 0.08),     0 0.25rem 2rem rgba(25, 26, 28, 0.16)}.option-list-item--dragging.sc-swirl-option-list-item:hover:not(.option-list-item--disabled){background-color:var(--s-translucent-low-pressed)}.option-list-item--selected.sc-swirl-option-list-item .option-list-item__label.sc-swirl-option-list-item{color:var(--s-text-highlight)}.option-list-item--selected.sc-swirl-option-list-item .option-list-item__icon.sc-swirl-option-list-item{color:var(--s-icon-highlight)}.option-list-item--selected.sc-swirl-option-list-item .option-list-item__checkbox-box.sc-swirl-option-list-item,.option-list-item--indeterminate.sc-swirl-option-list-item .option-list-item__checkbox-box.sc-swirl-option-list-item{border-color:var(--s-icon-highlight);color:var(--s-text-on-status);background-color:var(--s-icon-highlight)}.option-list-item--disabled.sc-swirl-option-list-item{cursor:default}.option-list-item--disabled.option-list-item--selected.sc-swirl-option-list-item .option-list-item__checkbox-box.sc-swirl-option-list-item{background-color:var(--s-icon-disabled)}.option-list-item--disabled.option-list-item--selected.sc-swirl-option-list-item .option-list-item__checkbox-icon.sc-swirl-option-list-item{color:var(--s-text-on-status)}.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__label.sc-swirl-option-list-item,.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__description.sc-swirl-option-list-item{color:var(--s-text-disabled)}.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__icon.sc-swirl-option-list-item,.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__selection-icon.sc-swirl-option-list-item,.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__checkbox-icon.sc-swirl-option-list-item{color:var(--s-icon-disabled)}.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__checkbox-box.sc-swirl-option-list-item{border-color:var(--s-icon-disabled);background-color:var(--s-surface-overlay-default)}.option-list-item--disabled.option-list-item--indeterminate.sc-swirl-option-list-item .option-list-item__checkbox-box.sc-swirl-option-list-item{border-color:var(--s-icon-disabled);color:var(--s-text-on-status);background-color:var(--s-icon-disabled)}.option-list-item--disabled.sc-swirl-option-list-item .option-list-item__avatar.sc-swirl-option-list-item{filter:grayscale(100%)}.option-list-item--show-avatar.sc-swirl-option-list-item .option-list-item__avatar.sc-swirl-option-list-item{display:inline-flex}.option-list-item__label-container.sc-swirl-option-list-item{display:flex;flex-grow:1;flex-direction:column;overflow:hidden}.option-list-item__label-container.sc-swirl-option-list-item>*.sc-swirl-option-list-item{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.option-list-item__label.sc-swirl-option-list-item{color:var(--s-text-default);font-size:var(--s-font-size-base);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);text-align:left}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item__label.sc-swirl-option-list-item{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.option-list-item__description.sc-swirl-option-list-item{color:var(--s-text-subdued);font-size:var(--s-font-size-base);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-base);text-align:left}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item__description.sc-swirl-option-list-item{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.option-list-item__avatar.sc-swirl-option-list-item{display:none;flex-shrink:0}.option-list-item__icon.sc-swirl-option-list-item{display:inline-flex;position:relative;width:1.5rem;height:1.5rem;flex-shrink:0;color:var(--s-icon-default)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item__icon.sc-swirl-option-list-item{width:1.25rem;height:1.25rem}}.option-list-item__icon-badge.sc-swirl-option-list-item{position:absolute;display:grid;bottom:0;right:0}.option-list-item__selection-icon.sc-swirl-option-list-item{display:inline-flex;flex-shrink:0;color:var(--s-icon-highlight)}.option-list-item__checkbox.sc-swirl-option-list-item{display:inline-flex;width:1.5rem;height:1.5rem;padding:var(--s-space-2);flex-shrink:0}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.option-list-item__checkbox.sc-swirl-option-list-item{width:1.375rem;height:1.375rem}}.option-list-item__checkbox-box.sc-swirl-option-list-item{display:inline-flex;width:100%;height:100%;justify-content:center;align-items:center;border:0.125rem solid var(--s-icon-default);border-radius:var(--s-border-radius-s)}.option-list-item__checkbox-icon.sc-swirl-option-list-item{display:inline-flex}.option-list-item__checkbox-indeterminate-icon.sc-swirl-option-list-item{position:relative;width:100%;height:100%}.option-list-item__checkbox-indeterminate-icon.sc-swirl-option-list-item:after{position:absolute;top:50%;left:50%;width:0.625rem;height:0.125rem;border-radius:0.0625rem;background-color:currentColor;content:"";transform:translate3d(-50%, -50%, 0)}.option-list-item__drag-handle.sc-swirl-option-list-item{position:absolute;z-index:1;top:50%;right:var(--s-space-4);display:inline-flex;margin:0;padding:0;padding:var(--s-space-8);flex-shrink:0;border:none;color:var(--s-icon-default);background-color:transparent;cursor:grab;transform:translateY(-50%)}.option-list-item__drag-handle.sc-swirl-option-list-item:active{cursor:grabbing}.option-list-item__drag-handle.sc-swirl-option-list-item:focus:not(:focus-visible){outline:none}.option-list-item__drag-handle.sc-swirl-option-list-item:focus-visible{outline-color:var(--s-focus-default)}', _ = class {
  constructor(t) {
    l(this, t), this.toggleDrag = h(this, "toggleDrag", 7), this.context = "single-select", this.dragHandleDescription = "Press spacebar to toggle grab", this.dragHandleLabel = "Move option", this.selected = !1, this.indeterminate = !1, this.swirlAriaRole = "option", this.truncateLabel = !0, this.iconSize = 24, this.elementId = g(), this.mediaQueryUnsubscribe = () => {
    }, this.onDragHandleKeyDown = (e) => {
      (e.code === "Space" || e.code === "Enter") && (e.preventDefault(), this.toggleDrag.emit(this.el));
    }, this.onBlur = () => {
      this.focused = !1;
    }, this.onFocus = () => {
      this.focused = !0;
    };
  }
  componentDidLoad() {
    this.mediaQueryUnsubscribe = w.subscribe((t) => {
      this.forceIconProps(t), this.updateIconSize(t);
    });
  }
  disconnectedCallback() {
    this.mediaQueryUnsubscribe();
  }
  forceIconProps(t) {
    var o;
    const e = (o = this.iconEl) == null ? void 0 : o.children[0];
    e == null || e.setAttribute("size", t ? "20" : "24");
  }
  updateIconSize(t) {
    this.iconSize = t ? 20 : 24;
  }
  render() {
    const t = this.disabled ? "true" : void 0, e = this.indeterminate ? void 0 : String(this.selected), o = this.context === "multi-select", n = Boolean(this.icon) && this.context === "single-select", a = Boolean(this.iconBadge), c = this.el.querySelector('[slot="avatar"]'), d = this.selected && this.context === "single-select", p = r("option-list-item", `option-list-item--context-${this.context}`, {
      "option-list-item--disabled": this.disabled,
      "option-list-item--draggable": this.allowDrag,
      "option-list-item--dragging": this.dragging,
      "option-list-item--selected": this.selected,
      "option-list-item--indeterminate": this.indeterminate && !this.selected,
      "option-list-item--show-avatar": c
    });
    return i(b, { key: "619d25f898ecb82c1d7cc19d03b3f20fd8089cc8" }, i("div", { key: "eae99fefcc702fbc1a6da31da33aa403c94c5455", "aria-checked": this.swirlAriaRole === "menuitemradio" ? e : void 0, "aria-describedby": Boolean(this.description) ? `option-list-item-${this.elementId}-description` : void 0, "aria-disabled": t, "aria-labelledby": `option-list-item-${this.elementId}-label`, "aria-selected": this.swirlAriaRole === "option" ? e : void 0, class: p, id: `option-list-item-${this.elementId}`, onBlur: this.onBlur, onFocus: this.onFocus, part: "option-list-item", role: this.swirlAriaRole }, n && i("span", { key: "2a653a6769309fa0913e39c3e75e159a5686f266", class: "option-list-item__icon", innerHTML: this.icon, ref: (m) => this.iconEl = m }, a && i("span", { key: "0df86bda02e2a10fb772877eb38b3df92596ea16", class: "option-list-item__icon-badge", innerHTML: this.iconBadge })), o && i("span", { key: "7fbbf4b35710d3066e65f85229c5077dfe4b63a3", class: "option-list-item__checkbox" }, i("span", { key: "7ca4a1392b6be7fc4ba25a40f729db9cb9c3f257", class: "option-list-item__checkbox-box" }, this.selected && i("swirl-icon-check-strong", { key: "8b855648a0adf2d6d98e968537f1c3826e6fb01c", class: "option-list-item__checkbox-icon", size: 16 }), !this.selected && this.indeterminate && i("span", { key: "30031bbbb8ccc991dcc4ba3b9d4f6696673a08f6", class: "option-list-item__checkbox-indeterminate-icon" }))), i("span", { key: "d69fe821fa775f48450e2b7fc4b31d12e620429f", class: "option-list-item__avatar" }, i("slot", { key: "993729cb6354f8965fd8f8013728c08796f52bc0", name: "avatar" })), i("span", { key: "661084653536a1997511a3f8444ea55ea3cd0f54", class: "option-list-item__label-container" }, i("span", { key: "6f74740791e811c4ba6a36ba057b72e164e56fed", class: "option-list-item__label", style: { whiteSpace: this.truncateLabel ? "nowrap" : "normal" }, id: `option-list-item-${this.elementId}-label`, part: "option-list-item__label" }, this.label), this.description && i("span", { key: "2516832835110c5590fc66a2f4c575b5f4af640b", class: "option-list-item__description", id: `option-list-item-${this.elementId}-description` }, this.description)), d && i("span", { key: "501b2bc1c42f1c1cc032829558d09e114236ede1", class: "option-list-item__selection-icon" }, i("swirl-icon-check-small", { key: "44321e28ae48a5c5a187e8e6ca902fcebccde4f2", size: this.iconSize }))), this.allowDrag && i("button", { key: "b29e27595837586efa8106dd0c0d9d6b4159f98b", "aria-describedby": this.dragHandleDescription, "aria-label": `${this.dragHandleLabel} "${this.label}"`, class: "option-list-item__drag-handle", onKeyDown: this.onDragHandleKeyDown, tabIndex: this.focused ? 0 : -1, type: "button" }, i("swirl-icon-drag-handle", { key: "aa97a2830e819872c7a4fda64f39fe4c1fd52bec", size: this.iconSize })));
  }
  get el() {
    return u(this);
  }
};
_.style = x();
export {
  v as swirl_icon_check_small,
  _ as swirl_option_list_item
};
