import{d as p,C as c,b as d,w as m,B as u,g as y,o,a as v,E as b,f as x,e as _,_ as f,F as g,s as B}from"./JQJBiNWj.js";import{T as h}from"./HM4z-iuB.js";const i="max-sm:[&>.p-button-label]:hidden max-sm:[&>.p-button-icon]:!m-0 max-sm:aspect-square max-sm:px-1",q=p({__name:"Button",props:{mode:{},hiddenLabelMobile:{type:Boolean},fixed:{type:Boolean},loading:{type:Boolean},tooltip:{},id:{}},setup(l){const e=l,a={add:{label:"Adicionar",icon:"pi pi-plus",severity:"primary",class:`${i}`},addModal:{label:"Adicionar",icon:"pi pi-file",severity:"primary"},addIcon:{icon:"pi pi-plus",severity:"primary",title:"Adicionar",ariaLabel:"Adicionar"},visualize:{label:"Visualizar",icon:"pi pi-eye",severity:"primary",class:`${i}`},visualizeIcon:{title:"Visualizar",ariaLabel:"Visualizar",icon:"pi pi-eye",severity:"primary",class:`${i}`},save:{outlined:!1,severity:"primary",label:"Salvar"},cancel:{label:"Cancelar",icon:"pi pi-times",severity:"secondary"},delete:{label:"Excluir",icon:"pi pi-trash",severity:"danger"},clean:{label:"Limpar",icon:"pi pi-eraser",outlined:!1,severity:"secondary"},search:{label:"Pesquisar",icon:"pi pi-search",severity:"primary"},downloadFile:{icon:"pi pi-download",severity:"primary",title:"Baixar arquivo",ariaLabel:"Baixar arquivo"},visualizationFile:{icon:"pi pi-eye",severity:"primary",title:"Visualizar arquivo",ariaLabel:"Visualizar arquivo"},deleteFile:{icon:"pi pi-trash",severity:"danger",outlined:!0,title:"Excluir arquivo",ariaLabel:"Excluir arquivo"},deleteIcon:{icon:"pi pi-trash",severity:"danger",outlined:!0,title:"Excluir",ariaLabel:"Excluir"},back:{icon:"pi pi-undo",label:"Voltar",severity:"secondary",outlined:!0},link:{icon:"pi pi-external-link",severity:"secondary",outlined:!1},edit:{label:"Editar",icon:"pi pi-pen-to-square",severity:"primary",class:`${i}`},editIcon:{icon:"pi pi-pen-to-square",severity:"primary",outline:!0,title:"Editar",ariaLabel:"Editar"}},r=!!a[e.mode].label;return(E,t)=>{const s=f,n=h;return c((o(),d(y(B),u({id:e.id},a[e.mode],{loading:e.loading,class:[r&&"flex gap-1 w-fit items-center",e.mode==="add"&&e.fixed&&"max-sm:fixed max-sm:bottom-4 max-sm:right-4 z-10 max-sm:shadow"]}),{default:m(()=>[e.mode==="save"&&!e.loading?(o(),v(g,{key:0},[x(s,{class:"text-lg mr-1",name:"material-symbols:save-rounded"}),t[0]||(t[0]=_("span",null,"Salvar",-1))],64)):b("",!0)]),_:1},16,["id","loading","class"])),[[n,e.tooltip??(r?void 0:a[e.mode].title)]])}}}),L=Object.assign(q,{__name:"UiButton"});export{L as _};
