import{z as $,E as B,_ as C}from"./h48l6b7a.js";import{_ as N}from"./nicon-title.vue-evdbm4ef.js";import{l as h,U as i,V as s,Z as a,a1 as w,a0 as _,u as l,F as p,a9 as b,aa as k,W as t,X as d,R as r,a7 as u,a6 as c,N as V}from"./vendor/json-editor-vue-hrh84odz.js";const S=["open"],x={"text-base":""},z={key:0,"text-sm":"",op50:""},T=h({__name:"NSectionBlock",props:{icon:{},text:{},description:{},containerClass:{default:""},headerClass:{},collapse:{type:Boolean,default:!0},open:{type:Boolean,default:!0},padding:{type:[Boolean,String],default:!0}},setup(f){const n=$(f,"open",void 0,{passive:!0});function m(e){n.value=e.target.open}return(e,o)=>{const v=B,g=N;return r(),i(p,null,[s("details",{open:l(n),onToggle:o[0]||(o[0]=(...y)=>m(...y))},[s("summary",{class:a(["cursor-pointer select-none hover:bg-active p4",e.collapse?"":"pointer-events-none"])},[w(g,{icon:e.icon,text:e.text,"text-xl":"",transition:"",class:a([l(n)?"op100":"op60",e.headerClass])},{default:_(()=>[s("div",null,[s("div",x,[t(e.$slots,"text",{},()=>[u(c(e.text),1)],!0)]),e.description||e.$slots.description?(r(),i("div",z,[t(e.$slots,"description",{},()=>[u(c(e.description),1)],!0)])):d("",!0)]),o[1]||(o[1]=s("div",{class:"flex-auto"},null,-1)),t(e.$slots,"actions",{},void 0,!0),e.collapse?(r(),V(v,{key:0,icon:"carbon-chevron-down",class:"chevron","cursor-pointer":"","place-self-start":"","text-base":"",op75:"",transition:"","duration-500":""})):d("",!0)]),_:3},8,["icon","text","class"])],2),o._lazyshow1||l(n)?(o._lazyshow1=!0,r(),i(p,null,[b(s("div",{class:a(["flex flex-col flex-gap2 pb6 pt2",typeof e.padding=="string"?e.padding:e.padding?"px4":""])},[t(e.$slots,"details",{},void 0,!0),s("div",{class:a([e.containerClass,"mt1"])},[t(e.$slots,"default",{},void 0,!0)],2),t(e.$slots,"footer",{},void 0,!0)],2),[[k,l(n)]])],64)):d("v-show-if",!0)],40,S),o[2]||(o[2]=s("div",{class:"x-divider"},null,-1))],64)}}}),M=C(T,[["__scopeId","data-v-bae9fa8d"]]);export{M as _};
