import{a as T}from"./chunk-7EF7CJL5.js";import{a as b}from"./chunk-F35BJT25.js";import{a as O}from"./chunk-EL3ZEK6J.js";import"./chunk-53ZXTZX2.js";import"./chunk-D46GGZZ4.js";import{$b as g,Aa as u,Gb as w,Jc as f,Kc as S,_b as _,bc as y,cc as x,dc as P,ec as v,fc as d,gc as r,hc as h,md as c,nd as m,pb as i,qc as A,sc as C,uc as p,za as s}from"./chunk-CZOGMAXR.js";function G(n,t){if(n&1&&(d(0,"app-icon"),f(1),r()),n&2){let e=p();i(),S(e.group().icon)}}function D(n,t){if(n&1){let e=A();d(0,"li",4)(1,"app-add-section-item",5),C("onPreview",function(){let a=s(e).$implicit,l=p(2);return u(l.raiseOnPreview(a))})("onAdd",function(){let a=s(e).$implicit,l=p(2);return u(l.raiseOnAdd(a))}),r()()}if(n&2){let e=t.$implicit,o=p(2);i(),v("section",e)("inPreview",e.type===o.underPreviewType())("child",!0)}}function I(n,t){if(n&1&&(d(0,"ul"),x(1,D,2,3,"li",4,y),r()),n&2){let e=p();i(),P(e.group().items)}}var M=class n{group=m.required();opened=m(!1);underPreviewType=m(null);onAdd=c();onPreview=c();onOpened=c();raiseOnAdd(t){this.onAdd.emit(t)}raiseOnPreview(t){this.onPreview.emit(t)}raiseOnOpened(){this.onOpened.emit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=w({type:n,selectors:[["app-add-section-group"]],inputs:{group:[1,"group"],opened:[1,"opened"],underPreviewType:[1,"underPreviewType"]},outputs:{onAdd:"onAdd",onPreview:"onPreview",onOpened:"onOpened"},decls:7,vars:5,consts:[[1,"container"],[1,"group",3,"click"],[1,"name"],[3,"opened","vertical"],[1,"border-b"],[3,"onPreview","onAdd","section","inPreview","child"]],template:function(e,o){e&1&&(d(0,"div",0)(1,"div",1),C("click",function(){return o.raiseOnOpened()}),_(2,G,2,1,"app-icon"),d(3,"div",2),f(4),r(),h(5,"app-chevron",3),r(),_(6,I,3,0,"ul"),r()),e&2&&(i(2),g(o.group().icon?2:-1),i(2),S(o.group().name),i(),v("opened",o.opened())("vertical",!0),i(),g(o.opened()?6:-1))},dependencies:[O,b,T],styles:[".group[_ngcontent-%COMP%]{display:flex;cursor:pointer;flex-direction:row;align-items:center}.group[_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)))}.group[_ngcontent-%COMP%]{padding-left:.625rem;padding-right:.625rem}.group[_ngcontent-%COMP%]:hover{background:#f6f6f6}.name[_ngcontent-%COMP%]{flex-grow:1;padding-top:.75rem;padding-bottom:.75rem}"],changeDetection:0})};export{M as AddSectionGroupComponent};
