var e=Object.defineProperty,t=Object.defineProperties,l=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,s=(t,l,r)=>l in t?e(t,l,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[l]=r,o=(e,t)=>{for(var l in t||(t={}))a.call(t,l)&&s(e,l,t[l]);if(r)for(var l of r(t))n.call(t,l)&&s(e,l,t[l]);return e},i=(e,r)=>t(e,l(r));import{k as c,r as p,f as u,u as d,q as f,bl as b,bm as m,N as y,bn as O}from"./vendor.9d9efc92.js";/* empty css              */import{p as j,c as v,i as x,ac as g,ad as h,ae as P}from"./index.10276049.js";var w=c({name:"Description",props:{useCollapse:j.bool.def(!0),title:j.string.def(""),size:j.oneOf(["small","default","middle",void 0]).def("small"),bordered:j.bool.def(!0),column:{type:[Number,Object],default:()=>({xxl:4,xl:3,lg:3,md:3,sm:2,xs:1})},collapseOptions:{type:Object,default:null},schema:{type:Array,default:()=>[]},data:j.object},emits:["register"],setup(e,{slots:t,emit:l}){const r=p(null),{prefixCls:a}=v("description"),n=g(),s=u((()=>o(o({},e),d(r)))),c=u((()=>i(o({},d(s)),{title:void 0}))),j=u((()=>!!d(s).title)),w=u((()=>o({canExpand:!1},d(c).collapseOptions))),C=u((()=>o(o({},d(n)),d(c))));function E({label:e,labelMinWidth:t,labelStyle:l}){if(!l&&!t)return e;const r=i(o({},l),{minWidth:`${t}px `});return f("div",{style:r},[e])}const M=()=>{let e;return f(b,y({class:`${a}`},d(C)),"function"==typeof(t=e=function(){const{schema:e,data:t}=d(c);return d(e).map((e=>{const{render:l,field:r,span:a,show:n,contentMinWidth:s}=e;if(n&&x(n)&&!n(t))return null;const o=()=>{var e;const t=null==(e=d(c))?void 0:e.data;if(!t)return null;const a=O(t,r);return x(l)?l(a,t):null!=a?a:""},i=s;return f(b.Item,{label:E(e),key:r,span:a},{default:()=>s?f("div",{style:{minWidth:`${i}px`}},[o()]):o()})})).filter((e=>!!e))}())||"[object Object]"===Object.prototype.toString.call(t)&&!m(t)?e:{default:()=>[e]});var t};return l("register",{setDescProps:function(e){r.value=o(o({},d(r)),e)}}),()=>d(j)?(()=>{const l=e.useCollapse?M():f("div",null,[M()]);if(!e.useCollapse)return l;const{canExpand:r,helpMessage:a}=d(w),{title:n}=d(s);return f(P,{title:n,canExpan:r,helpMessage:a},{default:()=>l,action:()=>h(t,"action")})})():M()}});export{w as _};
