
/**
 * 由 Fantastic-admin 提供技术支持
 * Powered by Fantastic-admin
 * https://fantastic-admin.hurui.me
 */
  
import{pn as e}from"./src-CLMBPGj1.js";import{C as t,Ct as n,St as r,bt as i}from"./reactivity.esm-bundler-D9OPVc9J.js";import{Ht as a,_ as o,b as s,ct as c,g as l,mt as u,v as d,xt as f,y as p,z as m}from"./runtime-core.esm-bundler-D-xeQwTN.js";import{m as h}from"./runtime-dom.esm-bundler-Dnva3vcP.js";import{J as g}from"./lib-C-QGo8GG-CvPpiVvZ.js";import{t as _}from"./rolldown-runtime-Dy4uBu1J-DK3Fl9T5.js";import{t as v}from"./useConfig-C0V0eG7L-BW30Wel-.js";import{t as y}from"./_plugin-vue_export-helper-B3ysoDQm-BDNMzG2s.js";import{t as b}from"./useNestedProp-BYfiWVP8-DbrxFlsg.js";import{n as x}from"./BaseIcon-DJbOzCDs-C4GBSsnJ.js";var S=e({n:()=>C,t:()=>D}),C=_({default:()=>D}),w={class:`vue-data-ui-component`},T=[`id`],E={key:0,class:`vue-ui-accordion-arrow`},D=y({__name:`vue-ui-accordion`,props:{config:{type:Object,default(){return{}}},hideDetails:{type:Boolean,default:!1}},emits:[`toggle`],setup(e,{emit:_}){h(e=>({fc620ee6:P.value}));let{vue_ui_accordion:y}=v(),S=e,C=_,D=l(()=>b({userConfig:S.config,defaultConfig:y})),O=l(()=>D.value.useCursorPointer),k=t(D.value.open),A=t(g()),j=t(null),M=t(0);c(()=>{j.value.open=D.value.open}),a(()=>D.value.open,e=>{j.value.open=e});function N(){(M.value>0||!D.value.open)&&(k.value=!k.value),M.value+=1,C(`toggle`)}let P=l(()=>`${D.value.maxHeight}px`);return(t,a)=>(u(),s(`div`,w,[o(`details`,{id:`details_${A.value}`,ref_key:`details`,ref:j,onToggle:N},[o(`summary`,{class:i({"vue-ui-accordion-headless":e.hideDetails}),style:n({cursor:O.value?`pointer`:`default`})},[o(`div`,{class:`vue-ui-accordion-head`,style:n(`background:${D.value.head.backgroundColor};padding:${D.value.head.padding}; ${e.hideDetails?`height: 0px !important; padding: 0 !important;`:``}`)},[e.hideDetails?p(``,!0):(u(),s(`div`,E,[D.value.head.useArrowSlot?f(t.$slots,`arrow`,r(m({backgroundColor:D.value.head.backgroundColor,color:D.value.head.color,iconColor:D.value.head.iconColor,isOpen:k.value})),void 0,!0,0):(u(),d(x,{key:1,name:D.value.head.icon,stroke:D.value.head.iconColor,size:D.value.head.iconSize},null,8,[`name`,`stroke`,`size`]))])),f(t.$slots,`title`,r(m({color:D.value.head.color,isOpen:k.value})),void 0,!0)],4)],6)],40,T),o(`div`,{class:`vue-ui-accordion-content`,style:n(`background:${D.value.body.backgroundColor};color:${D.value.body.color}`)},[f(t.$slots,`content`,r(m({backgroundColor:D.value.body.backgroundColor,color:D.value.body.color,isOpen:k.value})),void 0,!0)],4)]))}},[[`__scopeId`,`data-v-2782a9e6`]]);export{S as n,D as t};