import{C as e,D as t,J as n,M as r,P as i,V as a,W as o,Y as s,_ as c,b as l,ft as u,it as d,n as f,nt as p,ot as m,q as h,st as g,t as _,v,w as y}from"../../client.js";import{t as b}from"../../custom-element-forward-events.js";import x from"../checkbox/Checkbox.js";import S from"../radio/Radio.js";var C=i(`<div class="mc-tile__header svelte-z2cgb1"><div class="mc-tile__body svelte-z2cgb1"><!></div> <div class="mc-tile__action svelte-z2cgb1"><!></div></div>`),w=i(`<div class="mc-tile__body svelte-z2cgb1"><!></div> <div class="mc-tile__action svelte-z2cgb1"><!></div>`,1),T=i(`<div class="mc-tile__content svelte-z2cgb1"><!></div>`),E=i(`<div><!> <!></div>`),D={hash:`svelte-z2cgb1`,code:`/**
 * Do not edit directly, this file was auto-generated.
 */.mc-tile.svelte-z2cgb1 {border-radius:var(--border-radius-m, 0.5rem);background-color:var(--tile-color-background-primary, #ffffff);}
@media (prefers-reduced-motion: no-preference) {.mc-tile.svelte-z2cgb1 {
    /* stylelint-disable-next-line no-invalid-position-declaration */transition:background-color 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67);}
}
@media (prefers-reduced-motion: reduce) {.mc-tile.svelte-z2cgb1 {
    /* stylelint-disable-next-line no-invalid-position-declaration */transition:none;}
}.mc-tile.svelte-z2cgb1 {box-sizing:border-box;display:flex;flex-direction:column;position:relative;overflow:hidden;}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}.mc-tile__body.svelte-z2cgb1 {flex:1;}.mc-tile--bordered.svelte-z2cgb1 {box-shadow:0 0 0 1px var(--tile-color-border-default, #cccccc);}.mc-tile__action.svelte-z2cgb1 {border-radius:0 0 var(--border-radius-m, 0.5rem) var(--border-radius-m, 0.5rem);box-sizing:border-box;background-color:transparent;display:flex;align-items:center;justify-content:flex-end;padding:0.5rem 0.5rem;gap:0.5rem;}.mc-tile.svelte-z2cgb1:not(.mc-tile--clickable, .mc-tile--expandable, .mc-tile--selectable) {border-radius:var(--border-radius-m, 0.5rem);background-color:var(--tile-color-background-primary, #ffffff);}
@media (prefers-reduced-motion: no-preference) {.mc-tile.svelte-z2cgb1:not(.mc-tile--clickable, .mc-tile--expandable, .mc-tile--selectable) {
    /* stylelint-disable-next-line no-invalid-position-declaration */transition:background-color 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67);}
}
@media (prefers-reduced-motion: reduce) {.mc-tile.svelte-z2cgb1:not(.mc-tile--clickable, .mc-tile--expandable, .mc-tile--selectable) {
    /* stylelint-disable-next-line no-invalid-position-declaration */transition:none;}
}.mc-tile.svelte-z2cgb1:not(.mc-tile--clickable, .mc-tile--expandable, .mc-tile--selectable) {cursor:default;pointer-events:none;}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}.mc-tile:not(.mc-tile--clickable, .mc-tile--expandable, .mc-tile--selectable).mc-tile--bordered.svelte-z2cgb1 {box-shadow:0 0 0 1px var(--tile-color-border-default, #cccccc);}.mc-tile.svelte-z2cgb1:not(.mc-tile--clickable, .mc-tile--expandable, .mc-tile--selectable):has(.mc-tile__content:where(.svelte-z2cgb1)) {display:flex;flex-direction:column;}.mc-tile.svelte-z2cgb1:not(.mc-tile--clickable, .mc-tile--expandable, .mc-tile--selectable):has(.mc-tile__content:where(.svelte-z2cgb1)) .mc-tile__content:where(.svelte-z2cgb1) {border-top:1px solid var(--tile-color-border-default, #cccccc);}.mc-tile.svelte-z2cgb1:not(.mc-tile--clickable, .mc-tile--expandable, .mc-tile--selectable):has(.mc-tile__action:where(.svelte-z2cgb1)) {pointer-events:auto;display:flex;flex-direction:column;}.mc-tile.svelte-z2cgb1:not(.mc-tile--clickable, .mc-tile--expandable, .mc-tile--selectable):has(.mc-tile__action:where(.svelte-z2cgb1)) .mc-tile__header:where(.svelte-z2cgb1) {display:flex;flex-direction:row;align-items:stretch;justify-content:space-between;}.mc-tile.svelte-z2cgb1:not(.mc-tile--clickable, .mc-tile--expandable, .mc-tile--selectable):has(.mc-tile__action:where(.svelte-z2cgb1)) .mc-tile__body:where(.svelte-z2cgb1) {flex-grow:1;display:flex;flex-direction:column;justify-content:center;}.mc-tile.svelte-z2cgb1:not(.mc-tile--clickable, .mc-tile--expandable, .mc-tile--selectable):has(.mc-tile__action:where(.svelte-z2cgb1)) .mc-tile__action:where(.svelte-z2cgb1) {flex-shrink:0;display:flex;align-items:center;justify-content:center;padding:0.75rem 0.75rem;pointer-events:auto;background-color:transparent;}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}
@supports (interpolate-size: allow-keywords) {
}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}
@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
  }
  @media (prefers-reduced-motion: reduce) {
  }
}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}
@media (prefers-reduced-motion: no-preference) {
}
@media (prefers-reduced-motion: reduce) {
}.mc-tile--selectable.svelte-z2cgb1 {border-radius:var(--border-radius-m, 0.5rem);background-color:var(--tile-color-background-primary, #ffffff);}
@media (prefers-reduced-motion: no-preference) {.mc-tile--selectable.svelte-z2cgb1 {
    /* stylelint-disable-next-line no-invalid-position-declaration */transition:background-color 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67);}
}
@media (prefers-reduced-motion: reduce) {.mc-tile--selectable.svelte-z2cgb1 {
    /* stylelint-disable-next-line no-invalid-position-declaration */transition:none;}
}
@media (prefers-reduced-motion: no-preference) {.mc-tile--selectable.svelte-z2cgb1 {
    /* stylelint-disable-next-line no-invalid-position-declaration */transition:background-color 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67), box-shadow 200ms ease;}
}
@media (prefers-reduced-motion: reduce) {.mc-tile--selectable.svelte-z2cgb1 {
    /* stylelint-disable-next-line no-invalid-position-declaration */transition:none;}
}.mc-tile--selectable.svelte-z2cgb1 {cursor:pointer;position:relative;display:flex;flex-direction:row;align-items:stretch;justify-content:space-between;overflow:hidden;box-shadow:0 0 0 1px var(--tile-color-border-default, #cccccc);}.mc-tile--selectable.svelte-z2cgb1 .mc-tile__body:where(.svelte-z2cgb1) {flex-grow:1;display:flex;flex-direction:column;}.mc-tile--selectable.svelte-z2cgb1 .mc-tile__action:where(.svelte-z2cgb1) {background-color:transparent;box-sizing:border-box;flex-shrink:0;display:flex;align-items:flex-start;justify-content:center;border-radius:initial;padding:0.75rem 0.75rem;}.mc-tile--selectable.svelte-z2cgb1:has(.mc-tile__content:where(.svelte-z2cgb1)) {flex-direction:column;align-items:stretch;}.mc-tile--selectable.svelte-z2cgb1:has(.mc-tile__content:where(.svelte-z2cgb1)) .mc-tile__header:where(.svelte-z2cgb1) {display:flex;flex-direction:row;align-items:stretch;justify-content:space-between;}.mc-tile--selectable.svelte-z2cgb1:has(.mc-tile__content:where(.svelte-z2cgb1)) .mc-tile__header:where(.svelte-z2cgb1) .mc-tile__body:where(.svelte-z2cgb1) {display:flex;flex-direction:column;}.mc-tile--selectable.svelte-z2cgb1:has(.mc-tile__content:where(.svelte-z2cgb1)) .mc-tile__content:where(.svelte-z2cgb1) {border-top:1px solid var(--tile-color-border-default, #cccccc);}.mc-tile--selectable:has(.mc-tile__content:where(.svelte-z2cgb1)).mc-tile--input-left.svelte-z2cgb1 {flex-direction:column;}.mc-tile--selectable:has(.mc-tile__content:where(.svelte-z2cgb1)).mc-tile--input-left.svelte-z2cgb1 .mc-tile__header:where(.svelte-z2cgb1) {flex-direction:row-reverse;}.mc-tile--selectable:has(.mc-tile__content:where(.svelte-z2cgb1)).mc-tile--input-center.svelte-z2cgb1 {align-items:stretch;}.mc-tile--selectable:has(.mc-tile__content:where(.svelte-z2cgb1)).mc-tile--input-center.svelte-z2cgb1 .mc-tile__header:where(.svelte-z2cgb1) {align-items:center;}.mc-tile--selectable.mc-tile--input-left.svelte-z2cgb1 {flex-direction:row-reverse;}.mc-tile--selectable.mc-tile--input-center.svelte-z2cgb1 {align-items:center;}.mc-tile--selectable.svelte-z2cgb1:hover {box-shadow:0 0 0 2px var(--tile-color-border-default, #cccccc);}.mc-tile--selectable.mc-tile--selected.svelte-z2cgb1 {box-shadow:0 0 0 2px var(--color-brand, #78be20), 0 0 0 4px var(--color-background-accent, #ebf5de);}`};function O(i,_){let b=e(_);g(_,!0),l(i,D);let O=f(_,`checked`,15,!1),k=f(_,`bordered`,7,!0),A=f(_,`inputtype`,7,`checkbox`),j=f(_,`inputposition`,7,`right`),M=f(_,`centered`,7),N=crypto.randomUUID();var P={get checked(){return O()},set checked(e=!1){O(e),d()},get bordered(){return k()},set bordered(e=!0){k(e),d()},get inputtype(){return A()},set inputtype(e=`checkbox`){A(e),d()},get inputposition(){return j()},set inputposition(e=`right`){j(e),d()},get centered(){return M()},set centered(e){M(e),d()}},F=E(),I=h(F),L=e=>{var n=C(),i=h(n);y(h(i),_,`default`,{},null),u(i);var o=s(i,2),c=h(o),l=e=>{{let t=p(()=>`checkbox-${N}`);x(e,{get id(){return a(t)},name:`tile-select-group`,get checked(){return O()},set checked(e){O(e)}})}},d=e=>{{let t=p(()=>`radio-${N}`);S(e,{get id(){return a(t)},name:`tile-select-group`,get checked(){return O()},set checked(e){O(e)}})}};t(c,e=>{A()===`checkbox`?e(l):e(d,-1)}),u(o),u(n),r(e,n)},R=e=>{var i=w(),o=n(i);y(h(o),_,`default`,{},null),u(o);var c=s(o,2),l=h(c),d=e=>{{let t=p(()=>`checkbox-${N}`);x(e,{get id(){return a(t)},name:`tile-select-group`,get checked(){return O()},set checked(e){O(e)}})}},f=e=>{{let t=p(()=>`radio-${N}`);S(e,{get id(){return a(t)},name:`tile-select-group`,get checked(){return O()},set checked(e){O(e)}})}};t(l,e=>{A()===`checkbox`?e(d):e(f,-1)}),u(c),r(e,i)};t(I,e=>{b.details?e(L):e(R,-1)});var z=s(I,2),B=e=>{var t=T();y(h(t),_,`details`,{},null),u(t),r(e,t)};return t(z,e=>{b.details&&e(B)}),u(F),o(()=>c(F,1,v({"mc-tile mc-tile--selectable":!0,"mc-tile--selected":O(),"mc-tile--bordered":k(),"mc-tile--input-left":j()===`left`,"mc-tile--input-center":M()}),`svelte-z2cgb1`)),r(i,F),m(P)}customElements.define(`m-tile-selectable`,_(O,{checked:{attribute:`checked`,reflect:!0,type:`Boolean`},bordered:{attribute:`bordered`,reflect:!0,type:`Boolean`},centered:{attribute:`centered`,reflect:!0,type:`Boolean`},inputtype:{},inputposition:{}},[`default`,`details`],[],{mode:`open`},b));
//# sourceMappingURL=TileSelectable.js.map