import{_ as M}from"./DDV-HLQE.js";import{_ as $}from"./DH0wiJat.js";import{_ as Z}from"./C65BTjsa.js";import{_ as P,u as j}from"./CfWU_JKz.js";import{_ as q}from"./BqnRxGiA.js";import{_ as J}from"./DW2OqR52.js";import{A as G}from"./DJzKbefB.js";import{u as K,a as Q}from"./xuFIMMr7.js";import{d as z,b as n,o as t,w as c,e as f,a as v,F as x,r as W,G as X,f as i,t as Y,g as o,R as E,L as oo,$ as to,c as eo,E as O,A as io}from"./dVzHJMF1.js";import{_ as ao}from"./DOUDRyCQ.js";import{_ as no}from"./Brk5FU9k.js";import{_ as so}from"./BSKYqXUj.js";import ro from"./iZ-xiGRB.js";import{h as mo}from"./CH1bAkoS.js";import{u as co,D as b}from"./CX2DUt_P.js";import{T as I}from"./Byi2WFzI.js";import{b as lo}from"./DbDZ8cqT.js";import{u as _o}from"./CJ1p9Ehj.js";import{u as po}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"./C9L2ikqF.js";import"./B3dHCiEQ.js";import"./BZjcnCH7.js";import"./wlXwsacy.js";import"./fvoe36K6.js";import"./BNYh59m7.js";import"./CrEL4Vxb.js";import"./CYvl7uw_.js";import"./DYJY2RZG.js";import"./BuQ9u7Je.js";import"./BW5cYMVL.js";import"./Coj9p228.js";import"./cMkL48JQ.js";import"./COliOQKD.js";import"./-CGeDbWH.js";import"./DzXlli-V.js";import"./5WXaDlrT.js";import"./CWr_imfF.js";import"./D4oUL8iA.js";const uo={class:"base-grid"},fo={class:"font-bold"},Ao=z({__name:"Caracteristicas",setup(H){const a=K(),A=[{title:"Bordo esquerdo",name:"idCorBordoEsquerdo",class:"lg:col-span-6"},{title:"Bordo direito",name:"idCorBordoDireito",class:"lg:col-span-6"},{title:"Eixo 1",name:"idCorEixo1",class:"lg:col-span-4"},{title:"Eixo 2",name:"idCorEixo2",class:"lg:col-span-4"},{title:"Eixo 3",name:"idCorEixo3",class:"lg:col-span-4"}];return(C,S)=>{const T=P,r=q,h=J;return t(),n(h,{title:"Características"},{default:c(()=>[f("div",uo,[(t(),v(x,null,W(A,e=>f("div",{key:e.name,class:X(["col-span-12",e.class])},[f("h3",fo,Y(e.title),1),i(r,{name:e.name,label:"Cor:"},{default:c(()=>[i(T,{name:e.name,"campo-referencia":e.name,"tipo-ativo":o(G).TipoAtivo.SinalizacaoHorizontalTachaTachoes,disabled:!o(a)},null,8,["name","campo-referencia","tipo-ativo","disabled"])]),_:2},1032,["name"])],2)),64))])]),_:1})}}}),Co=Object.assign(Ao,{__name:"AtivosElementoSinalizacaoHorizontalTachaTachoesCaracteristicas"}),So={class:"flex flex-col gap-5"},zt=z({__name:"[id]",setup(H){const a=_o({view:E.ATV_VISUALIZAR_CADASTRO_SINALIZACAO_HORIZONTAL_TACHAS_TACHOES,add:E.ATV_EDITAR_CADASTRO_SINALIZACAO_HORIZONTAL_TACHAS_TACHOES,remove:E.ATV_REMOVER_CADASTRO_SINALIZACAO_HORIZONTAL_TACHAS_TACHOES}),{ready:A,elementoId:C,isEditMode:S,isSubmiting:T,initialValues:r,refreshForm:h,toggleEditMode:e,handleSubmitForm:y,deleteElemento:L}=Q(I.SinalizacaoHorizontalTachaTachoes,a.value.add,a.value.view),N=mo(lo),k=oo("formRef");po(k),j(I.SinalizacaoHorizontalTachaTachoes);const{path:B}=to(),D=co(),F=eo(()=>{var d;const R=B.split("/").filter(Boolean),l=[];let _="";for(const u of R){if(_+="/"+u,/^\d+$/.test(u))continue;const s=D.map[_];s!=null&&s.name&&l.push(JSON.parse(JSON.stringify(s)))}const p=(d=r.value)==null?void 0:d.id.idElemento;return p&&l.push({name:String(p),to:""}),l});return(R,l)=>{var g;const _=M,p=$,d=Z,u=Co,s=ao,m=no,U=io,V=so,w=ro;return t(),v(x,null,[i(_,{title:`Cadastros - Sinalização Horizontal - Tachas e Tachões - ${(g=o(r))==null?void 0:g.id.idElemento}`,trace:o(F)},null,8,["title","trace"]),f("div",So,[o(A)?(t(),n(w,{ref_key:"formRef",ref:k,key:o(h),resolver:o(N),"initial-values":o(r),class:"space-y-10",onSubmit:o(y)},{default:c(()=>[i(d,{"show-extensao":"","show-pista":""}),i(u),i(s),i(V,{"show-menu":!0},{default:c(()=>[o(S)&&o(C)!==o(b)?(t(),v(x,{key:0},[o(a).remove?(t(),n(m,{key:0,mode:"delete",class:"max-sm:w-full",onClick:o(L)},null,8,["onClick"])):O("",!0),i(m,{mode:"cancel",class:"ms-auto",onClick:o(e)},null,8,["onClick"])],64)):(t(),n(U,{key:1,to:"./",class:"ms-auto"},{default:c(()=>[i(m,{mode:o(C)!==o(b)?"back":"cancel"},null,8,["mode"])]),_:1})),o(S)&&o(a).add?(t(),n(m,{key:2,mode:"save",label:"Salvar",type:"submit",loading:o(T)},null,8,["loading"])):o(a).add?(t(),n(m,{key:3,mode:"edit",label:"Editar",onClick:o(e)},null,8,["onClick"])):O("",!0)]),_:1})]),_:1},8,["resolver","initial-values","onSubmit"])):(t(),n(p,{key:0}))])],64)}}});export{zt as default};
