import { r as h, i as m, x as l, e as f } from "./query-assigned-elements-D930kELM.mjs";
import { n as s } from "./property-DJzm_oB9.mjs";
import { i as g } from "./query-CDOd1Kwm.mjs";
import { o as d } from "./class-map-DPUylGZM.mjs";
import { o as y } from "./style-map-D2TR7M-D.mjs";
import { s as v, C as u } from "./mwc-checkbox.css-BrjbMwch.mjs";
const b = ':host .mdc-toggle__background{position:absolute;top:4px;right:4px;width:15px;height:15px;border:none;color:var(--mdc-theme-on-primary)}:host .mdc-toggle__checkmark-path{transition:stroke-dashoffset .18s cubic-bezier(.4,0,.6,1) 0ms;stroke:currentcolor;stroke-width:3.12px;stroke-dashoffset:29.7833;stroke-dasharray:29.7833}:host .showCheck{stroke-dashoffset:0;opacity:1}:host([width=fill]){width:100%}.container{display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center;row-gap:8px;width:var(--width);height:var(--height);border:solid 2px var(--mdc-theme-border);border-radius:8px;color:var(--mdc-theme-text-primary-on-background);--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.container:before,.container:after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.container:before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.container:after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.container.mdc-ripple-upgraded:before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.container.mdc-ripple-upgraded:after{top:0;left:0;transform:scale(0);transform-origin:center center}.container.mdc-ripple-upgraded--unbounded:after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.container.mdc-ripple-upgraded--foreground-activation:after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.container.mdc-ripple-upgraded--foreground-deactivation:after{animation:mdc-ripple-fg-opacity-out .15s;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.container:before,.container:after{top:0%;left:0%;width:100%;height:100%}.container.mdc-ripple-upgraded:before,.container.mdc-ripple-upgraded:after{top:var(--mdc-ripple-top, 0% );left:var(--mdc-ripple-left, 0% );width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.container.mdc-ripple-upgraded:after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.container:before,.container:after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.container:hover:before,.container.mdc-ripple-surface--hover:before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.container.mdc-ripple-upgraded--background-focused:before,.container:not(.mdc-ripple-upgraded):focus:before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.container:not(.mdc-ripple-upgraded):after{transition:opacity .15s linear}.container:not(.mdc-ripple-upgraded):active:after{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.container.mdc-ripple-upgraded{--mdc-ripple-fg-opacity: var(--mdc-ripple-press-opacity, .12)}.container:after,.container:before{border-radius:8px}.container:hover{cursor:pointer}.cornerFill{background:linear-gradient(225deg,var(--mdc-theme-primary) 28px,transparent 0)}.checked{--mdc-theme-text-icon-on-background: var(--mdc-theme-primary);border:solid 2px var(--mdc-theme-primary);background-color:var(--mdc-theme-surface-primary-highlight);font-variation-settings:"FILL" 1}.checked:hover{background-color:var(--mdc-theme-surface-primary-highlight-hover)}[name=icon]::slotted(*){font-size:40px;color:var(--mdc-theme-text-icon-on-background)}[name=text]::slotted(*){color:var(--mdc-theme-text-primary-on-background);font-family:var(--mdc-typography-body1-font-family);font-size:var(--mdc-typography-body1-font-size);font-weight:var(--mdc-typography-body1-font-weight);line-height:var(--mdc-typography-body1-line-height);letter-spacing:.4px}[name=text]::slotted(*:last-child){color:var(--mdc-theme-text-secondary-on-background);font-family:var(--mdc-typography-body2-font-family);font-size:var(--mdc-typography-body2-font-size);font-weight:var(--mdc-typography-body2-font-weight);line-height:var(--mdc-typography-body2-line-height)}';
var k = Object.defineProperty, x = Object.getOwnPropertyDescriptor, i = (a, r, o, c) => {
  for (var t = c > 1 ? void 0 : c ? x(r, o) : r, n = a.length - 1, p; n >= 0; n--)
    (p = a[n]) && (t = (c ? p(r, o, t) : p(t)) || t);
  return c && t && k(r, o, t), t;
};
let e = class extends u {
  constructor() {
    super(...arguments), this.width = "200", this.height = "160", this.iconOnly = !1;
  }
  render() {
    const a = {
      checked: this.checked,
      cornerFill: this.checked
    }, r = {
      showCheck: this.checked
    }, o = {
      "--width": this.width == "fill" ? "100%" : `${this.width}px`,
      "--height": `${this.height}px`
    };
    return l`
        <div class="${d(a)} container" style="${y(o)}" @click="${this._handleClick}">
            <input type="checkbox" class="mdc-checkbox__native-control"></input>
            <div class="mdc-toggle__background">
                <svg class="mdc-toggle__checkmark ${d(
      r
    )}" viewBox="0 0 24 24">
                    <path class="mdc-toggle__checkmark-path ${d(
      r
    )}" fill="none" d="M1.73,12.91 8.1,19.28 22.79,4.59"></path>
                </svg>
            </div>
            <slot name="icon"></slot>
            ${this.iconOnly ? "" : l`<div><slot name="text"></slot></div>`}
        </div>
    `;
  }
  _handleClick() {
    this.checked = !this.checked;
  }
};
e.styles = [
  m`
      ${h(b)}
    `,
  v
];
i([
  s()
], e.prototype, "width", 2);
i([
  s()
], e.prototype, "height", 2);
i([
  s({ type: Boolean })
], e.prototype, "iconOnly", 2);
i([
  g(".container")
], e.prototype, "mdcRoot", 2);
e = i([
  f("cv-checkbox-icon")
], e);
const P = e;
export {
  e as CovalentIconCheckToggle,
  P as default
};
