import{o as L,c as S,e as q,a as B,p as i,x as C,s as y,t as G,j as H,n as J,k as K,u as M,b as u,d as N,f as k,h as a,m as l,r as s}from"../../custom-element.js";import{i as E}from"../../if.js";import{a as O,s as P}from"../../slot.js";import{b as Q}from"../../this.js";import{c as R}from"../../custom-element-forward-events.js";import{D as T}from"../divider/Divider.js";import"../../branches.js";import"../../attributes.js";var U=k('<span class="mc-action-list__divider svelte-rf7fkv"><!></span>'),V=k('<span class="mc-action-list__icon svelte-rf7fkv"><!></span>'),W=k('<!> <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);const X={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 Y(p,t){const z=O(t);q(t,!0),B(p,X);let c=i(t,"label",7),n=i(t,"disabled",7),v=i(t,"appearance",7),f=i(t,"divider",7),d=i(t,"onclick",7),m;function D(){m.focus()}var j={focus:D,get label(){return c()},set label(e){c(e),l()},get disabled(){return n()},set disabled(e){n(e),l()},get appearance(){return v()},set appearance(e){v(e),l()},get divider(){return f()},set divider(e){f(e),l()},get onclick(){return d()},set onclick(e){d(e),l()}},g=W(),h=C(g);{var A=e=>{var r=U(),b=a(r);T(b,{}),s(r),u(e,r)};E(h,e=>{f()&&e(A)})}var _=y(h,2),o=a(_),x=a(o);{var F=e=>{var r=V(),b=a(r);P(b,t,"icon",{},null),s(r),u(e,r)};E(x,e=>{z.icon&&e(F)})}var w=y(x,2),I=a(w,!0);return s(w),s(o),Q(o,e=>m=e,()=>m),s(_),G(()=>{H(_,1,J({"mc-action-list__element":!0,"mc-action-list__element--danger":v()==="danger","mc-action-list__element--disabled":n()}),"svelte-rf7fkv"),o.disabled=n(),K(I,c())}),M("click",o,function(...e){d()?.apply(this,e)}),u(p,g),N(j)}L(["click"]);customElements.define("m-action-listbox-item",S(Y,{label:{},disabled:{},appearance:{},divider:{},onclick:{}},["icon"],["focus"],{mode:"open"},R));
//# sourceMappingURL=ActionListboxItem.js.map
