import{o as n}from"./FcRkkR--.js";import{h as c}from"./CH1bAkoS.js";import{z as t}from"./JQJBiNWj.js";import{a as S,z as A}from"./Dd3ROLQd.js";const m="agencia-area-provider",u={RSP:"Responsável",SUB:"Substituto",GER:"Gerente",COO:"Coordenador",TEC:"Técnico"},I={RESPONSAVEL:"RSP",SUBSTITUTO:"SUB"},g=n(u),l={A:"Ativo",I:"Inativo"},O=n(l),U={Ativo:"A",Inativo:"I"},d=t.object({sigla:t.string().trim().min(1),descricao:t.string().trim().min(1),idAreaPai:A.optional().nullable(),status:S.optional().nullable(),visivelEmPleito:t.boolean().optional()}),_=c(d);function T(i){if(i)return{sigla:i.sigla,descricao:i.descricao,idAreaPai:i.idAreaPai,status:i.status,visivelEmPleito:i.visivelEmPleito??!1}}function v(i){const a=new Map;i.forEach(o=>{const s={data:{...o},key:o.id.toString(),children:[]};a.set(o.id,s)});const r=[];return i.forEach(o=>{const s=a.get(o.id);if(o.idAreaPai===null||o.idAreaPai===void 0)r.push(s);else{const e=a.get(o.idAreaPai);e?e.children.push(s):r.push(s)}}),r}const p=t.object({id:t.object({idUsuario:A}),perfil:S,cargo:t.string().optional().nullable()}),b=c(p);function h(i){if(i)return{id:{idUsuario:i.idUsuario},perfil:i.perfil,cargo:i.cargo}}export{m as A,I as P,U as S,_ as a,T as b,O as c,h as d,g as e,u as f,v as g,b as u};
