import{C as e,D as t,J as n,L as r,M as i,P as a,R as o,W as s,Y as c,_ as l,a as u,b as d,ft as f,it as p,j as m,n as h,ot as g,q as _,st as v,t as y,v as b,w as x}from"../../client.js";import{t as S}from"../../custom-element-forward-events.js";import C from"../divider/Divider.js";var w=a(`<span class="mc-action-list__divider svelte-rf7fkv"><!></span>`),T=a(`<span class="mc-action-list__icon svelte-rf7fkv"><!></span>`),E=a(`<!> <li role="menuitem"><button type="button" class="mc-action-list__button svelte-rf7fkv"><!> <p class="mc-action-list__text svelte-rf7fkv"> </p></button></li>`,1),D={hash:`svelte-rf7fkv`,code:`/**
 * Do not edit directly, this file was auto-generated.
 */.mc-action-list__element.svelte-rf7fkv {height:2.5rem;cursor:pointer;border-radius:var(--border-radius-s, 0.25rem);flex-grow:1;}.mc-action-list__element.svelte-rf7fkv:hover {background-color:var(--action-listbox-color-background-hover, rgba(0, 0, 0, 0.05));}.mc-action-list__element--danger.svelte-rf7fkv .mc-action-list__text:where(.svelte-rf7fkv) {color:var(--action-listbox-color-text-danger, #c61112);}.mc-action-list__element--danger.svelte-rf7fkv .mc-action-list__icon:where(.svelte-rf7fkv) {fill:var(--action-listbox-color-text-danger, #c61112);}.mc-action-list__element--danger.svelte-rf7fkv:hover {background-color:var(--action-listbox-color-background-danger-hover, rgba(198, 17, 18, 0.1));}.mc-action-list__element--disabled.svelte-rf7fkv .mc-action-list__text:where(.svelte-rf7fkv) {color:var(--action-listbox-color-text-disabled, #b3b3b3);}.mc-action-list__element--disabled.svelte-rf7fkv .mc-action-list__icon:where(.svelte-rf7fkv) {fill:var(--action-listbox-color-text-disabled, #b3b3b3);}.mc-action-list__element--disabled.svelte-rf7fkv:hover {background-color:transparent;}.mc-action-list__element--disabled.svelte-rf7fkv button:where(.svelte-rf7fkv) {cursor:not-allowed;}.mc-action-list__button.svelte-rf7fkv {background-color:transparent;color:var(--action-listbox-color-text-default, #000000);border:none;display:flex;align-items:center;gap:0.25rem;padding:0;padding:0 0.25rem;cursor:pointer;width:100%;height:100%;}.mc-action-list__button.svelte-rf7fkv:focus-visible {box-shadow:0 0 0 0.125rem var(--focus-color-mid, var(--focus-color-outline-mid, #ffffff)), 0 0 0 0.25rem var(--focus-color-outer, var(--focus-color-outline-outer, #000000));outline:0.125rem solid transparent;outline-offset:0.125rem;}.mc-action-list__text.svelte-rf7fkv {font-size:var(--font-size-150, 1rem);font-weight:var(--font-weight-regular, 400);line-height:var(--line-height-s, 1.3);text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;}.mc-action-list__icon.svelte-rf7fkv {width:1.25rem;height:1.25rem;}.mc-action-list__divider.svelte-rf7fkv {margin:0.5rem 0;}.mc-action-list__divider.svelte-rf7fkv {display:block;}`};function O(r,a){let y=e(a);v(a,!0),d(r,D);let S=h(a,`label`,7),O=h(a,`disabled`,7),k=h(a,`appearance`,7),A=h(a,`divider`,7),j=h(a,`onclick`,7),M;function N(){M.focus()}var P={focus:N,get label(){return S()},set label(e){S(e),p()},get disabled(){return O()},set disabled(e){O(e),p()},get appearance(){return k()},set appearance(e){k(e),p()},get divider(){return A()},set divider(e){A(e),p()},get onclick(){return j()},set onclick(e){j(e),p()}},F=E(),I=n(F),L=e=>{var t=w();C(_(t),{}),f(t),i(e,t)};t(I,e=>{A()&&e(L)});var R=c(I,2),z=_(R),B=_(z),V=e=>{var t=T();x(_(t),a,`icon`,{},null),f(t),i(e,t)};t(B,e=>{y.icon&&e(V)});var H=c(B,2),U=_(H,!0);return f(H),f(z),u(z,e=>M=e,()=>M),f(R),s(()=>{l(R,1,b({"mc-action-list__element":!0,"mc-action-list__element--danger":k()===`danger`,"mc-action-list__element--disabled":O()}),`svelte-rf7fkv`),z.disabled=O(),m(U,S())}),o(`click`,z,function(...e){j()?.apply(this,e)}),i(r,F),g(P)}r([`click`]),customElements.define(`m-action-listbox-item`,y(O,{label:{},disabled:{},appearance:{},divider:{},onclick:{}},[`icon`],[`focus`],{mode:`open`},S));
//# sourceMappingURL=ActionListboxItem.js.map