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