import{c as J,e as K,a as L,p as m,s as C,t as M,j as N,n as O,b as v,d as P,f as z,h as d,m as b,r as s,x as Q,i as g,w as _}from"../../custom-element.js";import{i as h}from"../../if.js";import{a as V,s as D}from"../../slot.js";import{C as F}from"../checkbox/Checkbox.js";import{R as I}from"../radio/Radio.js";import{c as W}from"../../custom-element-forward-events.js";import"../../branches.js";import"../../attributes.js";import"../../input.js";var X=z('<div class="mc-tile__header svelte-z2cgb1"><div class="mc-tile__body svelte-z2cgb1"><!></div> <div class="mc-tile__action svelte-z2cgb1"><!></div></div>'),Y=z('<div class="mc-tile__body svelte-z2cgb1"><!></div> <div class="mc-tile__action svelte-z2cgb1"><!></div>',1),Z=z('<div class="mc-tile__content svelte-z2cgb1"><!></div>'),$=z("<div><!> <!></div>");const ee={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 {transition:background-color 0.2s cubic-bezier(0.17, 0.67, 0.83, 0.67);}
}
@media (prefers-reduced-motion: reduce) {.mc-tile.svelte-z2cgb1 {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) {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) {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 {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 {transition:none;}
}
@media (prefers-reduced-motion: no-preference) {.mc-tile--selectable.svelte-z2cgb1 {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 {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 te(R,r){const S=V(r);K(r,!0),L(R,ee);let c=m(r,"checked",15,!1),x=m(r,"bordered",7,!0),u=m(r,"inputtype",7,"checkbox"),k=m(r,"inputposition",7,"right"),w=m(r,"centered",7);const f=crypto.randomUUID();var T={get checked(){return c()},set checked(e=!1){c(e),b()},get bordered(){return x()},set bordered(e=!0){x(e),b()},get inputtype(){return u()},set inputtype(e="checkbox"){u(e),b()},get inputposition(){return k()},set inputposition(e="right"){k(e),b()},get centered(){return w()},set centered(e){w(e),b()}},p=$(),U=d(p);{var q=e=>{var i=X(),l=d(i),y=d(l);D(y,r,"default",{},null),s(l);var a=C(l,2),j=d(a);{var B=t=>{{let n=_(()=>`checkbox-${f}`);F(t,{get id(){return g(n)},name:"tile-select-group",get checked(){return c()},set checked(o){c(o)}})}},E=t=>{{let n=_(()=>`radio-${f}`);I(t,{get id(){return g(n)},name:"tile-select-group",get checked(){return c()},set checked(o){c(o)}})}};h(j,t=>{u()==="checkbox"?t(B):t(E,-1)})}s(a),s(i),v(e,i)},A=e=>{var i=Y(),l=Q(i),y=d(l);D(y,r,"default",{},null),s(l);var a=C(l,2),j=d(a);{var B=t=>{{let n=_(()=>`checkbox-${f}`);F(t,{get id(){return g(n)},name:"tile-select-group",get checked(){return c()},set checked(o){c(o)}})}},E=t=>{{let n=_(()=>`radio-${f}`);I(t,{get id(){return g(n)},name:"tile-select-group",get checked(){return c()},set checked(o){c(o)}})}};h(j,t=>{u()==="checkbox"?t(B):t(E,-1)})}s(a),v(e,i)};h(U,e=>{S.details?e(q):e(A,-1)})}var G=C(U,2);{var H=e=>{var i=Z(),l=d(i);D(l,r,"details",{},null),s(i),v(e,i)};h(G,e=>{S.details&&e(H)})}return s(p),M(()=>N(p,1,O({"mc-tile mc-tile--selectable":!0,"mc-tile--selected":c(),"mc-tile--bordered":x(),"mc-tile--input-left":k()==="left","mc-tile--input-center":w()}),"svelte-z2cgb1")),v(R,p),P(T)}customElements.define("m-tile-selectable",J(te,{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"},W));
//# sourceMappingURL=TileSelectable.js.map
