import{parseFragment as e,registerTemplate as t,freezeTemplate as i,registerDecorators as d,registerComponent as s}from"@kdcloudjs/kwc";import o from"./icon.js";import n from"./shadowBaseClassPrivate.js";import"../utilsPrivate-CI3EeA5x.js";import"../client-Ddi3i8XR.js";import"../ssr-C2pjZzfv.js";import"../observable-tloG64m6.js";import"../empty_html-CjXB8rB4.js";import"../i18n-B98kiI7M.js";import"./iso8601Utils.js";import"../colorValid-qIPgkqGp.js";var a=[function(e,t,i){var d=e?"["+e+"]":"",s=e?"["+e+"-host]":"";return(t?":host .kdds-menu-item":s+" .kdds-menu-item")+d+" {display: flex;position: relative;padding: var(--kdds-c-button-menu-item-padding-top, 6px) var(--kdds-c-button-menu-item-padding-right, 12px);font-size: var(--kdds-c-button-menu-item-font-size, 14px);color: var(--kdds-c-button-menu-item-color, #212121);background-color: var(--kdds-c-button-menu-item-background, #FFFFFF);cursor: pointer;overflow: hidden;line-height: var(--kdds-c-button-menu-item-line-height, 1.5);transition: color 0.3s ease-in-out,\r\n background-color 0.3s ease-in-out;max-width: var(--kdds-c-menu-item-max-width, 576px);}"+(t?":host .kdds-menu-item:hover":s+" .kdds-menu-item:hover")+d+" {background-color: var(--kdds-c-button-menu-item-background-hover,#F5F5F5);}"+(t?":host .kdds-menu-item-divider":s+" .kdds-menu-item-divider")+d+"::after {content: '';position: absolute;bottom: 0;left: 0;width: 100%;height: var(--kdds-c-button-menu-item-divider-border-width, 1px);background-color: var(--kdds-c-button-menu-item-divider-border, #E6E8EE);}"+(t?":host .kdds-menu-item.kdds-button-disabled":s+" .kdds-menu-item.kdds-button-disabled")+d+" {cursor: not-allowed;color: var(--kdds-c-button-menu-item-color-disabled, #B2B2B2);background-color: var(--kdds-c-button-menu-item-background-disabled, #FFFFFF);}"+(t?":host .kdds-menu-item.kdds-button-loading":s+" .kdds-menu-item.kdds-button-loading")+d+" {color: var(--kdds-c-button-menu-item-color-disabled, #B2B2B2);background-color: var(--kdds-c-button-menu-item-background-disabled, #FFFFFF);}"+(t?":host .kdds-menu-item-container":s+" .kdds-menu-item-container")+d+" {position: relative;display: flex;min-width: 0;}"+(t?":host .kdds-menu-item-icon":s+" .kdds-menu-item-icon")+d+" {margin-right: var(--kdds-c-button-menu-item-icon-margin-right, 4px);}"+(t?":host .kdds-menu-item-loading-container":s+" .kdds-menu-item-loading-container")+d+" {position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);color: var(--kdds-c-button-menu-item-loading-color, #276FF5);}"+(t?":host .kdds-menu-item-label":s+" .kdds-menu-item-label")+d+" {flex: 1;min-width: 0;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}"}];const l=e`<span class="kdds-menu-item-label${0}"${2}>${"t1"}</span>`,r={classMap:{"kdds-menu-item-container":!0},key:1},m={"kdds-menu-item-icon":!0},c={classMap:{"kdds-menu-item-loading-container":!0},key:3},u={props:{iconName:"kdfont-loadingqianjing",spin:!0},key:4},k={key:7},b=[];function p(e,t,i,d){const{ncls:s,b:n,c:a,h:p,d:h,sp:v,st:g,s:f}=e,{_m0:w}=d;return[p("div",{className:s(t.computedItemClass),attrs:{title:t.label},key:0,on:w||(d._m0={click:n(t.handleClick)})},[p("span",r,[t.prefixicon?a("kd-icon",o,{classMap:m,props:{iconName:t.prefixicon},key:2}):null,t.loading?p("div",c,[a("kd-icon",o,u)]):null,g(l,6,[v(1,null,h(t.label))]),f("",k,b,i)])])]}var h=t(p);p.slots=[""],p.stylesheets=[],p.stylesheetToken="kwc-44aqs8dblea",p.legacyStylesheetToken="D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\menuItem-undefined_menuItem",a&&p.stylesheets.push.apply(p.stylesheets,a),i(p);class v extends n{constructor(...e){super(...e),this.label=void 0,this.divider=void 0,this.disabled=void 0,this.prefixicon=void 0,this.loading=void 0,this.value=void 0}get computedItemClass(){return["kdds-menu-item",!0===this.disabled||"true"===this.disabled?"kdds-button-disabled":"",!0===this.loading||"true"===this.loading?"kdds-button-loading":"",!0===this.divider||"true"===this.divider?"kdds-menu-item-divider":""].filter(Boolean).join(" ")}dispatchSelect(){return this.dispatchEvent(new CustomEvent("privateselect",{bubbles:!0,cancelable:!0,detail:{value:this.value,disabled:!0===this.disabled||"true"===this.disabled||!0===this.loading||"true"===this.loading}}))}handleClick(e){e.stopPropagation(),this.disabled||this.loading||(this.dispatchEvent(new CustomEvent("click",{detail:{value:this.value,label:this.label,disabled:this.disabled,loading:this.loading}})),this.dispatchSelect())}}d(v,{publicProps:{label:{config:0},divider:{config:0},disabled:{config:0},prefixicon:{config:0},loading:{config:0},value:{config:0}}});const g=s(v,{tmpl:h,sel:"D:\\new_workspace\\workspace\\kingdee-base-components\\src\\modules\\kd\\menuItem-",apiVersion:63});export{g as default};
