import{resetComponent as e,resetIcon as t}from"../../style/index.mjs";import n from"../../theme/util/genComponentStyleHook.mjs";import{merge as r}from"../../theme/util/statistic.mjs";import i from"../../style/motion/collapse.mjs";var a=n=>{let{componentCls:r,collapseContentBg:i,padding:a,collapseContentPaddingHorizontal:o,collapseHeaderBg:s,collapseHeaderPadding:c,collapsePanelBorderRadius:l,lineWidth:u,lineType:d,colorBorder:f,colorText:p,colorTextHeading:m,colorTextDisabled:h,fontSize:g,lineHeight:_,marginSM:v,paddingSM:y,motionDurationSlow:b,fontSizeIcon:x}=n,S=`${u}px ${d} ${f}`;return{[r]:{...e(n),backgroundColor:s,border:S,borderBottom:0,borderRadius:`${l}px`,"&-rtl":{direction:`rtl`},[`& > ${r}-item`]:{borderBottom:S,"&:last-child":{[`
            &,
            & > ${r}-header`]:{borderRadius:`0 0 ${l}px ${l}px`}},[`> ${r}-header`]:{position:`relative`,display:`flex`,flexWrap:`nowrap`,alignItems:`flex-start`,padding:c,color:m,lineHeight:_,cursor:`pointer`,transition:`all ${b}, visibility 0s`,[`> ${r}-header-text`]:{flex:`auto`},"&:focus":{outline:`none`},[`${r}-expand-icon`]:{height:g*_,display:`flex`,alignItems:`center`,paddingInlineEnd:v},[`${r}-arrow`]:{...t(),fontSize:x,svg:{transition:`transform ${b}`}},[`${r}-header-text`]:{marginInlineEnd:`auto`}},[`${r}-header-collapsible-only`]:{cursor:`default`,[`${r}-header-text`]:{flex:`none`,cursor:`pointer`},[`${r}-expand-icon`]:{cursor:`pointer`}},[`${r}-icon-collapsible-only`]:{cursor:`default`,[`${r}-expand-icon`]:{cursor:`pointer`}},[`&${r}-no-arrow`]:{[`> ${r}-header`]:{paddingInlineStart:y}}},[`${r}-content`]:{color:p,backgroundColor:i,borderTop:S,[`& > ${r}-content-box`]:{padding:`${a}px ${o}px`},"&-hidden":{display:`none`}},[`${r}-item:last-child`]:{[`> ${r}-content`]:{borderRadius:`0 0 ${l}px ${l}px`}},[`& ${r}-item-disabled > ${r}-header`]:{"\n          &,\n          & > .arrow\n        ":{color:h,cursor:`not-allowed`}},[`&${r}-icon-position-end`]:{[`& > ${r}-item`]:{[`> ${r}-header`]:{[`${r}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:v}}}}}}},o=e=>{let{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow svg`;return{[`${t}-rtl`]:{[n]:{transform:`rotate(180deg)`}}}},s=e=>{let{componentCls:t,collapseHeaderBg:n,paddingXXS:r,colorBorder:i}=e;return{[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${i}`},[`
        > ${t}-item:last-child,
        > ${t}-item:last-child ${t}-header
      `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-content`]:{backgroundColor:`transparent`,borderTop:0},[`> ${t}-item > ${t}-content > ${t}-content-box`]:{paddingTop:r}}}},c=e=>{let{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:`transparent`,border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-content`]:{backgroundColor:`transparent`,border:0,[`> ${t}-content-box`]:{paddingBlock:n}}}}}},l=n(`Collapse`,e=>{let t=r(e,{collapseContentBg:e.colorBgContainer,collapseHeaderBg:e.colorFillAlter,collapseHeaderPadding:`${e.paddingSM}px ${e.padding}px`,collapsePanelBorderRadius:e.borderRadiusLG,collapseContentPaddingHorizontal:16});return[a(t),s(t),c(t),o(t),i(t)]});export{l as default,a as genBaseStyle};