import{e as z,f as o,q as m,F as h,u as C,v as f,y as g,g as v,p as P,o as n,x as A,r as w,w as k,T as B,J as q,t as N,B as b,A as $,c as p,j as I}from"./iframe-Bl-fVlm8.js";import{_ as j}from"./PzIcon-cRuuou9i.js";import{P as F}from"./PzSkeleton-87dTujvi.js";import{_ as V}from"./_plugin-vue_export-helper-DlAUqK2U.js";const L=[{id:"line-1",width:"187px"},{id:"line-2",width:"242px"},{id:"line-3",width:"169px"},{id:"line-4",width:"364px"},{id:"line-5",width:"481px"},{id:"line-6",width:"436px"},{id:"line-7",width:"436px"},{id:"line-8",width:"436px"},{id:"line-9",width:"481px"}],S={key:0,class:"pz-accordion-content__transition"},O={key:0,class:"pz-accordion-content__loader"},T={key:1},s=z({name:"PzAccordionContent",__name:"PzAccordionContent",props:{active:{type:Boolean},loading:{type:Boolean,default:!1},contentClass:{default:""}},setup(a){return(d,y)=>a.active?(n(),o("div",S,[m("div",{class:v(["pz-accordion-content__surface",a.contentClass])},[a.loading?(n(),o("div",O,[(n(!0),o(h,null,C(f(L),t=>(n(),A(f(F),{key:t.id,width:t.width,height:"24px"},null,8,["width"]))),128))])):(n(),o("div",T,[g(d.$slots,"default",{},void 0,!0)]))],2)])):P("",!0)}}),U=V(s,[["__scopeId","data-v-69d723b3"]]);s.__docgenInfo=Object.assign({displayName:s.name??s.__name},{name:"PzAccordionContent",exportName:"default",displayName:"PzAccordionContent",description:"",tags:{},props:[{name:"active",required:!0,type:{name:"boolean"}},{name:"loading",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"contentClass",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}}],slots:[{name:"default"}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Layouts/PzAccordion/PzAccordionContent.vue"]});const W=["aria-expanded","disabled"],D={class:"pz-accordion__trigger-content"},i=z({name:"PzAccordion",__name:"PzAccordion",props:{modelValue:{type:Boolean,default:void 0},loading:{type:Boolean,default:!1},label:{default:""},disabled:{type:Boolean,default:!1},contentClass:{default:""},typography:{}},emits:["update:modelValue"],setup(a,{emit:d}){const y=d,t=a,c=I(),r=w(t.modelValue===!0),u=p(()=>{const e=c==null?void 0:c.vnode.props;return!!(e!=null&&e["onUpdate:modelValue"]||e!=null&&e.onUpdateModelValue)}),l=p(()=>u.value?t.modelValue===!0:r.value);k(()=>t.modelValue,e=>{!u.value&&e!==void 0&&(r.value=e)});const _=()=>{if(t.disabled)return;const e=!l.value;u.value||(r.value=e),y("update:modelValue",e)},x=p(()=>({active:l.value,disabled:t.disabled,toggle:_}));return(e,E)=>(n(),o("div",{class:v(["pz-accordion",{"pz-accordion--open":l.value,disabled:a.disabled}])},[m("button",{type:"button",class:"pz-accordion__trigger","aria-expanded":l.value,disabled:a.disabled,onClick:_},[m("span",D,[e.$slots.trigger?g(e.$slots,"trigger",B(q({key:0},x.value)),void 0,!0):(n(),o(h,{key:1},[a.label?(n(),o("span",{key:0,class:v(["pz-accordion__label",a.typography?`pz-typography--${a.typography}`:null])},N(a.label),3)):P("",!0)],64))]),b(f(j),{name:"expand_more",size:"20",class:"pz-accordion__icon"})],8,W),b(U,{active:l.value,"content-class":a.contentClass,loading:a.loading},{default:$(()=>[g(e.$slots,"default",{},void 0,!0)]),_:3},8,["active","content-class","loading"])],2))}}),K=V(i,[["__scopeId","data-v-fb296506"]]);i.__docgenInfo=Object.assign({displayName:i.name??i.__name},{name:"PzAccordion",exportName:"default",displayName:"PzAccordion",description:"",tags:{},props:[{name:"modelValue",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"undefined"}},{name:"loading",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"label",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}},{name:"disabled",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"contentClass",required:!1,type:{name:"string"},defaultValue:{func:!1,value:'""'}},{name:"typography",required:!1,type:{name:"PzTextVariant"}}],slots:[{name:"trigger",scoped:!0,bindings:[]},{name:"default"}],sourceFiles:["/builds/Web-Projects/client-services/prozorro-ui/src/components/Layouts/PzAccordion/PzAccordion.vue"]});export{K as P,U as a};
