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