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,a as l,b as u,ft as d,it as f,j as p,l as m,n as h,ot as g,q as _,r as v,st as y,t 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><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.svelte-rf7fkv {padding:0.5rem 0.5rem;margin:0;}.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 b=e(a);y(a,!0),u(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=h(a,`class`,7),N=v(a,[`$$slots`,`$$events`,`$$legacy`,`$$host`,`label`,`disabled`,`appearance`,`divider`,`onclick`,`class`]),P;function F(){P.focus()}var I={focus:F,get label(){return S()},set label(e){S(e),f()},get disabled(){return O()},set disabled(e){O(e),f()},get appearance(){return k()},set appearance(e){k(e),f()},get divider(){return A()},set divider(e){A(e),f()},get onclick(){return j()},set onclick(e){j(e),f()},get class(){return M()},set class(e){M(e),f()}},L=E(),R=n(L),z=e=>{var t=w();C(_(t),{}),d(t),i(e,t)};t(R,e=>{A()&&e(z)});var B=c(R,2);m(B,()=>({class:[`mc-action-list__element`,k()===`danger`&&`mc-action-list__element--danger`,O()&&`mc-action-list__element--disabled`,M()],role:`menuitem`,...N}),void 0,void 0,void 0,`svelte-rf7fkv`);var V=_(B),H=_(V),U=e=>{var t=T();x(_(t),a,`icon`,{},null),d(t),i(e,t)};t(H,e=>{b.icon&&e(U)});var W=c(H,2),G=_(W,!0);return d(W),d(V),l(V,e=>P=e,()=>P),d(B),s(()=>{V.disabled=O(),p(G,S())}),o(`click`,V,function(...e){j()?.apply(this,e)}),i(r,L),g(I)}r([`click`]),customElements.define(`m-action-listbox-item`,b(O,{label:{},disabled:{},appearance:{},divider:{},onclick:{},class:{}},[`icon`],[`focus`],{mode:`open`},S));
//# sourceMappingURL=ActionListboxItem.js.map