import{a as _}from"./chunk-EL3ZEK6J.js";import{Gb as u,Gd as y,Jc as a,Kc as l,Rd as P,Sd as C,Yc as v,ec as f,fc as o,gc as c,md as g,nd as r,pb as m,sc as p}from"./chunk-CZOGMAXR.js";var M=(d,n)=>({current:d,child:n}),h=class d{section=r.required();inPreview=r(!1);child=r(!1);descriptor=r(void 0);onPreview=g();onAdd=g();raiseOnPreview(){this.onPreview.emit()}getSectionName(){let n=["name","type"],e=this.descriptor();if(e&&e.displayPropertyName){let i=Array.isArray(e.displayPropertyName)?e.displayPropertyName:[e.displayPropertyName];n.splice(0,0,...i)}let t=this.section(),s=n.find(i=>!!t[i]);return C(P(t[s]))}raiseOnAdd(n){n.stopPropagation(),this.onAdd.emit()}static \u0275fac=function(e){return new(e||d)};static \u0275cmp=u({type:d,selectors:[["app-add-section-item"]],inputs:{section:[1,"section"],inPreview:[1,"inPreview"],child:[1,"child"],descriptor:[1,"descriptor"]},outputs:{onPreview:"onPreview",onAdd:"onAdd"},decls:7,vars:6,consts:[[1,"item",3,"click","ngClass"],[1,"name"],[1,"operation",3,"click"]],template:function(e,t){e&1&&(o(0,"div",0),p("click",function(){return t.raiseOnPreview()}),o(1,"app-icon"),a(2),c(),o(3,"div",1),a(4),c(),o(5,"app-icon",2),p("click",function(i){return t.raiseOnAdd(i)}),a(6,"add_box"),c()()),e&2&&(f("ngClass",v(3,M,t.inPreview(),t.child())),m(2),l(t.section().icon),m(2),l(t.getSectionName()))},dependencies:[y,_],styles:[".item[_ngcontent-%COMP%]{display:flex;cursor:pointer;flex-direction:row;align-items:center}.item[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:not([hidden]) ~ [_ngcontent-%COMP%]:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.item[_ngcontent-%COMP%]{padding-left:.625rem;padding-right:.625rem}.item[_ngcontent-%COMP%]:hover{background:#f6f6f6}.item[_ngcontent-%COMP%]:hover   .operation[_ngcontent-%COMP%]{visibility:visible}.item.current[_ngcontent-%COMP%]{background:#1665d81a;border-left:.25rem solid #1665D8;padding-left:.375rem}.item.child[_ngcontent-%COMP%]{padding-left:2rem}.item.child.current[_ngcontent-%COMP%]{padding-left:1.75rem}.operation[_ngcontent-%COMP%]{color:#1665d8;visibility:hidden}.name[_ngcontent-%COMP%]{flex-grow:1;padding-top:.75rem;padding-bottom:.75rem}"],changeDetection:0})};export{h as a};
