const e=require("../_util/props-util/index.js"),t=require("./Cell.js"),n=require("./index.js");let r=require("vue");var i=i=>{let a=(n,{colon:i,prefixCls:a,bordered:o},{component:s,type:c,showLabel:l,showContent:u,labelStyle:d,contentStyle:f})=>n.map((n,p)=>{let m=n.props||{},{prefixCls:h=a,span:g=1,labelStyle:_=m[`label-style`],contentStyle:v=m[`content-style`],label:y=n.children?.label?.()}=m,b=e.getSlot(n),x=e.getClass(n),S=e.getStyle(n),{key:C}=n;return typeof s==`string`?(0,r.createVNode)(t.default,{key:`${c}-${String(C)||p}`,class:x,style:S,labelStyle:{...d,..._},contentStyle:{...f,...v},span:g,colon:i,component:s,itemPrefixCls:h,bordered:o,label:l?y:null,content:u?b:null},null):[(0,r.createVNode)(t.default,{key:`label-${String(C)||p}`,class:x,style:{...d,...S,..._},span:1,colon:i,component:s[0],itemPrefixCls:h,bordered:o,label:y},null),(0,r.createVNode)(t.default,{key:`content-${String(C)||p}`,class:x,style:{...f,...S,...v},span:g*2-1,component:s[1],itemPrefixCls:h,bordered:o,content:b},null)]}),{prefixCls:o,vertical:s,row:c,index:l,bordered:u}=i,{labelStyle:d,contentStyle:f}=(0,r.inject)(n.descriptionsContext,{labelStyle:(0,r.ref)({}),contentStyle:(0,r.ref)({})});return s?(0,r.createVNode)(r.Fragment,null,[(0,r.createVNode)(`tr`,{key:`label-${l}`,class:`${o}-row`},[a(c,i,{component:`th`,type:`label`,showLabel:!0,labelStyle:d.value,contentStyle:f.value})]),(0,r.createVNode)(`tr`,{key:`content-${l}`,class:`${o}-row`},[a(c,i,{component:`td`,type:`content`,showContent:!0,labelStyle:d.value,contentStyle:f.value})])]):(0,r.createVNode)(`tr`,{key:l,class:`${o}-row`},[a(c,i,{component:u?[`th`,`td`]:`td`,type:`item`,showLabel:!0,showContent:!0,labelStyle:d.value,contentStyle:f.value})])};exports.default=i;