import{_ as U}from"./DDV-HLQE.js";import{_ as $}from"./DH0wiJat.js";import{_ as X}from"./C65BTjsa.js";import{_ as P}from"./BqnRxGiA.js";import{_ as j}from"./DW2OqR52.js";import J from"./C9L2ikqF.js";import{u as z,a as Z}from"./xuFIMMr7.js";import{d as O,b as n,o as i,w as m,e as C,f as e,g as o,R as A,L as q,$ as G,c as H,a as I,F as k,E as D,A as K}from"./dVzHJMF1.js";import{_ as Q}from"./Brk5FU9k.js";import{_ as W}from"./BSKYqXUj.js";import Y from"./iZ-xiGRB.js";import{h as oo}from"./CH1bAkoS.js";import{u as to,D as E}from"./CX2DUt_P.js";import{T as eo}from"./Byi2WFzI.js";import{e as io}from"./VAJ5YBGY.js";import{u as ao}from"./CJ1p9Ehj.js";import{u as no}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"./CL2jyiz8.js";import"./B-d7gz-d.js";import"./BSLzRQpY.js";import"./CNJ8Vm0G.js";import"./Bpf-t_rp.js";import"./yHxjwlra.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"./B7Hqpkvs.js";import"./DiwqsPB4.js";import"./KcBrPYTF.js";import"./r1Y5hC84.js";import"./D8XE_5qi.js";import"./wlXwsacy.js";import"./fvoe36K6.js";import"./BNYh59m7.js";import"./CrEL4Vxb.js";import"./cMkL48JQ.js";import"./B3dHCiEQ.js";import"./BZjcnCH7.js";import"./COliOQKD.js";import"./-CGeDbWH.js";import"./DzXlli-V.js";import"./CWr_imfF.js";import"./C3JtJyG7.js";import"./D4oUL8iA.js";const mo={class:"base-grid"},so=O({__name:"Caracteristicas",setup(b){const a=z();return(x,u)=>{const s=J,r=P,f=j;return i(),n(f,{title:"Características"},{default:m(()=>[C("div",mo,[e(r,{class:"col-span-12 md:col-span-4",name:"larguraFaixaDominio",label:"Largura da faixa de domínio:"},{default:m(()=>[e(s,{id:"larguraFaixaDominio",name:"larguraFaixaDominio",disabled:!o(a),"min-fraction-digits":2,"max-fraction-digits":2,class:"w-full"},null,8,["disabled"])]),_:1}),e(r,{class:"col-span-12 md:col-span-4",name:"larguraFaixaNaoEdificavel",label:"Largura da faixa não edificável:"},{default:m(()=>[e(s,{id:"larguraFaixaNaoEdificavel",name:"larguraFaixaNaoEdificavel",disabled:!o(a),"min-fraction-digits":2,"max-fraction-digits":2,class:"w-full"},null,8,["disabled"])]),_:1})])]),_:1})}}}),ro=Object.assign(so,{__name:"AtivosElementoFaixaDominioFaixaDominioCaracteristicas"}),co={class:"flex flex-col gap-5"},ut=O({__name:"[id]",setup(b){const a=ao({view:A.ATV_VISUALIZAR_CADASTRO_FAIXA_DOMINIO_FAIXA_DOMINIO,add:A.ATV_EDITAR_CADASTRO_FAIXA_DOMINIO_FAIXA_DOMINIO,remove:A.ATV_REMOVER_CADASTRO_FAIXA_DOMINIO_FAIXA_DOMINIO}),{ready:x,elementoId:u,idTitle:s,isEditMode:r,initialValues:f,isSubmiting:h,refreshForm:S,toggleEditMode:F,handleSubmitForm:N,deleteElemento:R}=Z(eo.FaixaDominio,a.value.add,a.value.view),M=oo(io),g=q("formRef");no(g);const{path:T}=G(),w=to(),y=H(()=>{var p;const v=T.split("/").filter(Boolean),c=[];let l="";for(const d of v){if(l+="/"+d,/^\d+$/.test(d))continue;const t=w.map[l];t!=null&&t.name&&c.push(JSON.parse(JSON.stringify(t)))}const _=(p=s.value)==null?void 0:p.replace(/^-\s*/,"").trim();return _&&c.push({name:_,to:""}),c});return(v,c)=>{const l=U,_=$,p=X,d=ro,t=Q,V=K,B=W,L=Y;return i(),I(k,null,[e(l,{title:`Cadastros - Faixa de domínio - ${o(s)}`,trace:o(y)},null,8,["title","trace"]),C("div",co,[o(x)?(i(),n(L,{ref_key:"formRef",ref:g,key:o(S),resolver:o(M),"initial-values":o(f),class:"space-y-10",onSubmit:o(N)},{default:m(()=>[e(p,{"show-km-inicial":!1,"show-km-final":!1,"show-direcao":!1,"show-sentido":!1}),e(d),e(B,{"show-menu":!0},{default:m(()=>[o(r)&&o(u)!==o(E)?(i(),I(k,{key:0},[o(a).remove?(i(),n(t,{key:0,mode:"delete",class:"max-sm:w-full",onClick:o(R)},null,8,["onClick"])):D("",!0),e(t,{mode:"cancel",class:"ms-auto",onClick:o(F)},null,8,["onClick"])],64)):(i(),n(V,{key:1,to:"./",class:"ms-auto"},{default:m(()=>[e(t,{mode:o(u)!==o(E)?"back":"cancel"},null,8,["mode"])]),_:1})),o(r)&&o(a).add?(i(),n(t,{key:2,mode:"save",label:"Salvar",type:"submit",loading:o(h)},null,8,["loading"])):o(a).add?(i(),n(t,{key:3,mode:"edit",label:"Editar",onClick:o(F)},null,8,["onClick"])):D("",!0)]),_:1})]),_:1},8,["resolver","initial-values","onSubmit"])):(i(),n(_,{key:0}))])],64)}}});export{ut as default};
