import{_ as x}from"./Brk5FU9k.js";import{d as R,z as r,a as U,f as o,U as A,w as t,g as i,R as I,i as C,o as T,A as N,e as p,t as k,n as w}from"./dVzHJMF1.js";import{_ as D}from"./DDV-HLQE.js";import{_ as O}from"./BqnRxGiA.js";import{_ as E}from"./CPhxMljB.js";import{_ as L}from"./C682XpkB.js";import{r as l,h as P}from"./pI06Dkb8.js";import y from"./G1F3Bacz.js";import B from"./C5Oc2f2M.js";import F from"./B7Hqpkvs.js";import{D as $}from"./CX2DUt_P.js";import{T as z}from"./BIFw_mF_.js";import{u as M}from"./CJ1p9Ehj.js";import{u as V}from"./BWID9sOX.js";import"./yXj_05M0.js";import"./Bhud8mbC.js";import"./DhLu8RVk.js";import"./CWHHmK0V.js";import"./tESAK1vk.js";import"./B79Hoqpc.js";import"./cMkL48JQ.js";import"./iZ-xiGRB.js";import"./BSLzRQpY.js";import"./CH1bAkoS.js";import"./DaykkcNl.js";import"./D2P12BLM.js";import"./DTJCrQga.js";import"./DDpCYtr5.js";import"./C9UvFovT.js";import"./FaLtR_4n.js";import"./C9L2ikqF.js";import"./B3dHCiEQ.js";import"./BZjcnCH7.js";import"./DiwqsPB4.js";import"./KcBrPYTF.js";import"./B_Kqq5Cu.js";import"./r1Y5hC84.js";import"./a1m94JqE.js";import"./BSe03gVj.js";import"./B-6EeO4n.js";import"./BuQ9u7Je.js";import"./BW5cYMVL.js";import"./CPg0DzIm.js";import"./BphmgIhx.js";import"./ClA_a7pZ.js";import"./CBbadgK0.js";import"./CM8mMzv6.js";import"./DP0doleY.js";import"./BAtzogEJ.js";import"./FcRkkR--.js";import"./Bpf-t_rp.js";import"./yHxjwlra.js";import"./KG16xCEZ.js";const j={class:"base-grid lg:grid-cols-3 grid-cols-2"},qo=R({__name:"index",setup(K){const _=M({add:I.SYS_USUARIO_INCLUIR}),u=r.object({search:r.string().optional(),tipo:r.string().optional(),status:r.enum(["A","I"]).optional()}),m=V("usuarios",e=>C.usuarios.findUsuariosKeycloak(e));function c(e){w(l(e.data.id),P(e))}return(e,Y)=>{const d=x,f=N,v=D,h=F,s=O,n=B,b=E,a=y,S=L;return T(),U("div",null,[o(v,{title:"Usuários"},A({_:2},[i(_).add?{name:"title-buttons",fn:t(()=>[o(f,{to:("resolveRelativeRoute"in e?e.resolveRelativeRoute:i(l))(i($))},{default:t(()=>[o(d,{mode:"add"})]),_:1},8,["to"])]),key:"0"}:void 0]),1024),o(b,{status:i(m).status.value,schema:i(u),"paginated-url":""},{default:t(()=>[p("div",j,[o(s,{label:"Localizar:",name:"search"},{default:t(()=>[o(h)]),_:1}),o(s,{label:"Status:",name:"status"},{default:t(()=>[o(n,{options:[{text:"Todos",value:void 0},{text:"Ativo",value:"A"},{text:"Inativo",value:"I"}],"option-label":"text","option-value":"value",placeholder:"Selecione...",fluid:""})]),_:1}),o(s,{label:"Tipo acesso:",name:"tipo"},{default:t(()=>[o(n,{options:i(z),"option-label":"label","option-value":"value",placeholder:"Selecione...",fluid:"","show-clear":""},null,8,["options"])]),_:1})])]),_:1},8,["status","schema"]),o(S,{class:"mt-16",value:i(m),rows:10,"auto-paginator":!0,"empty-message":"Não há dados",onRowClick:c},{default:t(()=>[o(a,{field:"nome",header:"Nome",sortable:""}),o(a,{field:"login",header:"Login",sortable:""}),o(a,{field:"email",header:"E-mail",sortable:""}),o(a,{field:"status",header:"Status",sortable:""},{body:t(g=>[p("span",null,k(g.data.status==="A"?"Ativo":"Inativo"),1)]),_:1})]),_:1},8,["value"])])}}});export{qo as default};
