import f from"../../_util/cssinjs/Keyframes.mjs";import"../../_util/cssinjs/StyleContext.mjs";import"vue";import"../../_util/cssinjs/transformers/legacyLogicalProperties.mjs";import"../../theme/internal.mjs";import I from"../../theme/util/genComponentStyleHook.mjs";import{merge as y}from"../../theme/util/statistic.mjs";const E=new f("ant-skeleton-loading",{"0%":{transform:"translateX(-37.5%)"},"100%":{transform:"translateX(37.5%)"}}),s=t=>({height:t,lineHeight:`${t}px`}),a=t=>({width:t,...s(t)}),M=t=>({position:"relative",zIndex:0,overflow:"hidden",background:"transparent","&::after":{position:"absolute",top:0,insetInlineEnd:"-150%",bottom:0,insetInlineStart:"-150%",background:t.skeletonLoadingBackground,animationName:E,animationDuration:t.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite",content:'""'}}),d=t=>({width:t*5,minWidth:t*5,...s(t)}),A=t=>{const{skeletonAvatarCls:e,color:n,controlHeight:o,controlHeightLG:l,controlHeightSM:i}=t;return{[`${e}`]:{display:"inline-block",verticalAlign:"top",background:n,...a(o)},[`${e}${e}-circle`]:{borderRadius:"50%"},[`${e}${e}-lg`]:{...a(l)},[`${e}${e}-sm`]:{...a(i)}}},L=t=>{const{controlHeight:e,borderRadiusSM:n,skeletonInputCls:o,controlHeightLG:l,controlHeightSM:i,color:r}=t;return{[`${o}`]:{display:"inline-block",verticalAlign:"top",background:r,borderRadius:n,...d(e)},[`${o}-lg`]:{...d(l)},[`${o}-sm`]:{...d(i)}}},u=t=>({width:t,...s(t)}),T=t=>{const{skeletonImageCls:e,imageSizeBase:n,color:o,borderRadiusSM:l}=t;return{[`${e}`]:{display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:o,borderRadius:l,...u(n*2),[`${e}-path`]:{fill:"#bfbfbf"},[`${e}-svg`]:{...u(n),maxWidth:n*4,maxHeight:n*4},[`${e}-svg${e}-svg-circle`]:{borderRadius:"50%"}},[`${e}${e}-circle`]:{borderRadius:"50%"}}},g=(t,e,n)=>{const{skeletonButtonCls:o}=t;return{[`${n}${o}-circle`]:{width:e,minWidth:e,borderRadius:"50%"},[`${n}${o}-round`]:{borderRadius:e}}},$=t=>({width:t*2,minWidth:t*2,...s(t)}),G=t=>{const{borderRadiusSM:e,skeletonButtonCls:n,controlHeight:o,controlHeightLG:l,controlHeightSM:i,color:r}=t;return{[`${n}`]:{display:"inline-block",verticalAlign:"top",background:r,borderRadius:e,width:o*2,minWidth:o*2,...$(o)},...g(t,o,n),[`${n}-lg`]:{...$(l)},...g(t,l,`${n}-lg`),[`${n}-sm`]:{...$(i)},...g(t,i,`${n}-sm`)}},x=t=>{const{componentCls:e,skeletonAvatarCls:n,skeletonTitleCls:o,skeletonParagraphCls:l,skeletonButtonCls:i,skeletonInputCls:r,skeletonImageCls:p,controlHeight:k,controlHeightLG:b,controlHeightSM:h,color:c,padding:S,marginSM:C,borderRadius:H,skeletonTitleHeight:v,skeletonBlockRadius:m,skeletonParagraphLineHeight:R,controlHeightXS:w,skeletonParagraphMarginTop:B}=t;return{[`${e}`]:{display:"table",width:"100%",[`${e}-header`]:{display:"table-cell",paddingInlineEnd:S,verticalAlign:"top",[`${n}`]:{display:"inline-block",verticalAlign:"top",background:c,...a(k)},[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:{...a(b)},[`${n}-sm`]:{...a(h)}},[`${e}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${o}`]:{width:"100%",height:v,background:c,borderRadius:m,[`+ ${l}`]:{marginBlockStart:h}},[`${l}`]:{padding:0,"> li":{width:"100%",height:R,listStyle:"none",background:c,borderRadius:m,"+ li":{marginBlockStart:w}}},[`${l}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${e}-content`]:{[`${o}, ${l} > li`]:{borderRadius:H}}},[`${e}-with-avatar ${e}-content`]:{[`${o}`]:{marginBlockStart:C,[`+ ${l}`]:{marginBlockStart:B}}},[`${e}${e}-element`]:{display:"inline-block",width:"auto",...G(t),...A(t),...L(t),...T(t)},[`${e}${e}-block`]:{width:"100%",[`${i}`]:{width:"100%"},[`${r}`]:{width:"100%"}},[`${e}${e}-active`]:{[`
        ${o},
        ${l} > li,
        ${n},
        ${i},
        ${r},
        ${p}
      `]:{...M(t)}}}},N=I("Skeleton",t=>{const{componentCls:e}=t,n=y(t,{skeletonAvatarCls:`${e}-avatar`,skeletonTitleCls:`${e}-title`,skeletonParagraphCls:`${e}-paragraph`,skeletonButtonCls:`${e}-button`,skeletonInputCls:`${e}-input`,skeletonImageCls:`${e}-image`,imageSizeBase:t.controlHeight*1.5,skeletonTitleHeight:t.controlHeight/2,skeletonBlockRadius:t.borderRadiusSM,skeletonParagraphLineHeight:t.controlHeight/2,skeletonParagraphMarginTop:t.marginLG+t.marginXXS,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${t.color} 25%, ${t.colorGradientEnd} 37%, ${t.color} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[x(n)]},t=>{const{colorFillContent:e,colorFill:n}=t;return{color:e,colorGradientEnd:n}});export{N as default};
