import{h as e}from"./p-15c07fa9.js";import{P as a}from"./p-0f3698af.js";import{s as t}from"./p-71b1be2e.js";var n,r,s;!function(e){e.PREVIOUS="PREVIOUS",e.NEXT="NEXT",e.REFRESH="REFRESH",e.UPDATE="UPDATE",e.CLONE="CLONE",e.REMOVE="REMOVE",e.INSERT="INSERT",e.CANCEL="CANCEL",e.SAVE="SAVE",e.GRID_MODE="GRID_MODE",e.FORM_MODE="FORM_MODE",e.MORE_OPTIONS="MORE_OPTIONS",e.DIVIDER="DIVIDER",e.CONFIGURATOR="CONFIGURATOR",e.DATA_EXPORTER="DATA_EXPORTER",e.ATTACH="ATTACH",e.ACTIONS_BUTTON="ACTIONS_BUTTON",e.UPDATE_MULTIPLE="UPDATE_MULTIPLE"}(n||(n={})),function(e){e.UPDATE="UPDATE",e.CLONE="CLONE",e.REMOVE="REMOVE",e.INSERT="INSERT",e.CONFIGURATOR="CONFIGURATOR"}(r||(r={})),function(e){e.CONFIGURATOR="CONFIGURATOR"}(s||(s={}));const i=(e,a,t,n,r)=>{const{hint:s,text:i,iconName:l}=e;return l?i?d(l,e.name,a,t,s,i,n,r):o(l,e.name,a,t,s,n,r):c(e.name,a,t,i,s,n,r)},l=(r,s,i,l,u,b,m,k,E)=>{var O;const T=l(r);switch(r){case n.PREVIOUS:return o("chevron-left",r,s,i,T,u,b);case n.NEXT:return o("chevron-right",r,s,i,T,u,b);case n.REFRESH:return o("sync",r,s,i,T,u,b);case n.UPDATE:return o("edit",r,s,i,T,u,b);case n.UPDATE_MULTIPLE:return o("edit-table",r,s,i,T,u,b);case n.CLONE:return o("copy",r,s,i,T,u,b);case n.REMOVE:return o("delete",r,s,i,T,u,b);case n.INSERT:return E===a.PRIMARY?d("plus",r,s,i,T,T,u,b):o("plus",r,s,i,T,u,b);case n.CANCEL:return c(r,s,i,T,T,u,b);case n.SAVE:return E===a.PRIMARY?d("save",r,s,i,T,T,u,b):o("save",r,s,i,T,u,b);case n.GRID_MODE:return o("table",r,s,i,T,u,b);case n.FORM_MODE:return o("list",r,s,i,T,u,b);case n.CONFIGURATOR:return(null==m?void 0:m.length)>0?function(a,t,n,r,s,i,l,c){return l&&l.length>0?e("taskbar-split-button",{iconName:a,class:n,key:s,"data-taskbar-icon":a,"data-taskbar-label":r,"data-taskbar-element":t,"data-element-id":s,enabled:i(t),actions:l,title:r,action:()=>c(t)}):void 0}("settings-inverted",r,s,T,i,b,m,u):o("settings-inverted",r,s,i,T,u,b);case n.MORE_OPTIONS:return function(a,t,n,r,s,i,l){return i&&i.length>0?e("taskbar-actions-button",{class:t,key:n,title:r,"data-taskbar-element":a,"data-element-id":n,enabled:s(a),actions:i,onTaskbarActionSelected:e=>l(e.detail.value)}):void 0}(r,s,i,T,b,m,u);case n.DIVIDER:return e("hr",{class:"ez-divider-vertical ez-divider--dark ez-margin--none ez-margin-left--medium","data-taskbar-divider":!0});case n.DATA_EXPORTER:const l=null===(O=t.get("exporterProviders"))||void 0===O?void 0:O[k];return e("snk-data-exporter",{class:s,provider:l,"data-element-id":i,"data-taskbar-element":r});case n.ATTACH:return o("anexo",r,s,i,T,u,b);case n.ACTIONS_BUTTON:return e("snk-actions-button",{"data-element-id":i,"data-taskbar-element":r})}};function c(a,t,n,r,s,i,l){return e("ez-button",{key:n,title:s,label:r,size:"small",class:t,"data-taskbar-label":r,"data-taskbar-element":a,"data-element-id":n,enabled:l(a),onClick:()=>i(a)})}function o(a,t,n,r,s,i,l){return e("ez-button",{key:r,title:s,mode:"icon",size:"small",class:n,"data-taskbar-label":s,"data-taskbar-element":t,"data-taskbar-icon":a,"data-element-id":r,iconName:a,enabled:l(t),onClick:()=>i(t)})}function d(a,t,n,r,s,i,l,c){return e("ez-button",{key:r,title:i,label:s,size:"small",class:n,"data-taskbar-label":s,"data-taskbar-icon":a,"data-taskbar-element":t,"data-element-id":r,enabled:c(t),onClick:()=>l(t)},e("ez-icon",{class:"ez-padding-right--small",slot:"leftIcon",iconName:a}))}export{r as A,n as T,s as V,i as a,l as b}