import{_ as z}from"./DDV-HLQE.js";import{_ as Z}from"./DH0wiJat.js";import{_ as O}from"./BqnRxGiA.js";import{_ as M}from"./DW2OqR52.js";import y from"./B7Hqpkvs.js";import{u as F,a as q}from"./xuFIMMr7.js";import{d as A,b as m,o as s,w as i,e as C,f as e,g as o,R as g,L as H,$ as K,c as Q,a as R,F as x,E as k,A as W}from"./dVzHJMF1.js";import{_ as X}from"./C65BTjsa.js";import{_ as Y}from"./DOUDRyCQ.js";import{_ as oo}from"./Brk5FU9k.js";import{_ as eo}from"./BSKYqXUj.js";import to from"./iZ-xiGRB.js";import{h as so}from"./CH1bAkoS.js";import{u as io,D as h}from"./CX2DUt_P.js";import{T as no}from"./Byi2WFzI.js";import{E as ao}from"./B-Tl_Lhh.js";import{u as mo}from"./CJ1p9Ehj.js";import{u as ro}from"./D2P12BLM.js";import"./DhLu8RVk.js";import"./CWHHmK0V.js";import"./yXj_05M0.js";import"./Bhud8mbC.js";import"./tESAK1vk.js";import"./B79Hoqpc.js";import"./B8efJPrx.js";import"./DNNucTFg.js";import"./cMkL48JQ.js";import"./BSLzRQpY.js";import"./DiwqsPB4.js";import"./KcBrPYTF.js";import"./yHxjwlra.js";import"./COliOQKD.js";import"./-CGeDbWH.js";import"./DzXlli-V.js";import"./CL2jyiz8.js";import"./B-d7gz-d.js";import"./CNJ8Vm0G.js";import"./Bpf-t_rp.js";import"./KG16xCEZ.js";import"./FcRkkR--.js";import"./DP0doleY.js";import"./BAtzogEJ.js";import"./C5Oc2f2M.js";import"./CBbadgK0.js";import"./a1m94JqE.js";import"./CM8mMzv6.js";import"./r1Y5hC84.js";import"./D8XE_5qi.js";import"./C9L2ikqF.js";import"./B3dHCiEQ.js";import"./BZjcnCH7.js";import"./wlXwsacy.js";import"./fvoe36K6.js";import"./BNYh59m7.js";import"./CrEL4Vxb.js";import"./5WXaDlrT.js";import"./CWr_imfF.js";import"./D4oUL8iA.js";const co={class:"base-grid"},lo=A({__name:"InformacoesGerais",setup(I){const t=F();return(E,_)=>{const n=y,a=O,c=M;return s(),m(c,{title:"Informações gerais"},{default:i(()=>[C("div",co,[e(a,{name:"codigo",label:"Identificação:",class:"col-span-12 lg:col-span-3"},{default:i(()=>[e(n,{id:"codigo",name:"codigo",disabled:!o(t)},null,8,["disabled"])]),_:1}),e(a,{name:"codigoSir",label:"Código do SIR:",class:"col-span-12 lg:col-span-3"},{default:i(()=>[e(n,{id:"codigo-sir",name:"codigoSir",disabled:!o(t)},null,8,["disabled"])]),_:1}),e(a,{name:"nomeEdificacaoSistema",label:"Nome edificação:",class:"col-span-12 lg:col-span-3"},{default:i(()=>[e(n,{id:"nome-edificacao",name:"nomeEdificacaoSistema",disabled:!o(t)},null,8,["disabled"])]),_:1})])]),_:1})}}}),_o=Object.assign(lo,{__name:"AtivosElementoSistemasEletricosSistemaEletricoInformacoesGerais"}),po={class:"base-grid"},uo=A({__name:"Caracteristicas",setup(I){const t=F();return(E,_)=>{const n=y,a=O,c=M;return s(),m(c,{title:"Características"},{default:i(()=>[C("div",po,[e(a,{name:"concessionariaEnergia",label:"Concessionária de energia:",class:"col-span-12 lg:col-span-6"},{default:i(()=>[e(n,{id:"concessionaria-energia",name:"concessionariaEnergia",disabled:!o(t)},null,8,["disabled"])]),_:1})])]),_:1})}}}),fo=Object.assign(uo,{__name:"AtivosElementoSistemasEletricosSistemaEletricoCaracteristicas"}),So={class:"flex flex-col gap-5"},Ie=A({__name:"[id]",setup(I){const t=mo({view:g.ATV_VISUALIZAR_CADASTRO_SISTEMAS_ELETRICOS_SISTEMAS_ELETRICOS,add:g.ATV_EDITAR_CADASTRO_SISTEMAS_ELETRICOS_SISTEMAS_ELETRICOS,remove:g.ATV_REMOVER_CADASTRO_SISTEMAS_ELETRICOS_SISTEMAS_ELETRICOS}),{ready:E,elementoId:_,idTitle:n,isEditMode:a,initialValues:c,isSubmiting:L,refreshForm:$,toggleEditMode:v,handleSubmitForm:U,deleteElemento:V}=q(no.SistemasEletricos,t.value.add,t.value.view),B=so(ao),T=H("formRef");ro(T);const{path:D}=K(),N=io(),w=Q(()=>{var f;const b=D.split("/").filter(Boolean),p=[];let d="";for(const S of b){if(d+="/"+S,/^\d+$/.test(S))continue;const r=N.map[d];r!=null&&r.name&&p.push(JSON.parse(JSON.stringify(r)))}const u=(f=n.value)==null?void 0:f.replace(/^-\s*/,"").trim();return u&&p.push({name:u,to:""}),p});return(b,p)=>{const d=z,u=Z,f=_o,S=X,r=fo,P=Y,l=oo,j=W,G=eo,J=to;return s(),R(x,null,[e(d,{title:`Cadastros - Sistemas elétricos - Sistemas elétricos - ${o(n)}`,trace:o(w)},null,8,["title","trace"]),C("div",So,[o(E)?(s(),m(J,{ref_key:"formRef",ref:T,key:o($),resolver:o(B),"initial-values":o(c),class:"space-y-10",onSubmit:o(U)},{default:i(()=>[e(f),e(S,{"show-pista":""}),e(r),e(P),e(G,{"show-menu":!0},{default:i(()=>[o(a)&&o(_)!==o(h)?(s(),R(x,{key:0},[o(t).remove?(s(),m(l,{key:0,mode:"delete",class:"max-sm:w-full",onClick:o(V)},null,8,["onClick"])):k("",!0),e(l,{mode:"cancel",class:"ms-auto",onClick:o(v)},null,8,["onClick"])],64)):(s(),m(j,{key:1,to:"./",class:"ms-auto"},{default:i(()=>[e(l,{mode:o(_)!==o(h)?"back":"cancel"},null,8,["mode"])]),_:1})),o(a)&&o(t).add?(s(),m(l,{key:2,mode:"save",label:"Salvar",type:"submit",loading:o(L)},null,8,["loading"])):o(t).add?(s(),m(l,{key:3,mode:"edit",label:"Editar",onClick:o(v)},null,8,["onClick"])):k("",!0)]),_:1})]),_:1},8,["resolver","initial-values","onSubmit"])):(s(),m(u,{key:0}))])],64)}}});export{Ie as default};
