import{textEllipsis as r,resetComponent as g}from"../../style/index.mjs";import"../../theme/internal.mjs";import d from"../../theme/util/genComponentStyleHook.mjs";import{merge as n}from"../../theme/util/statistic.mjs";import{operationUnit as t}from"../../style/operationUnit.mjs";const o=a=>{const{componentCls:e,antCls:i}=a;return{[e]:{...g(a),position:"relative",padding:`${a.pageHeaderPaddingVertical}px ${a.pageHeaderPadding}px`,backgroundColor:a.colorBgContainer,[`&${e}-ghost`]:{backgroundColor:a.pageHeaderGhostBg},"&.has-footer":{paddingBottom:0},[`${e}-back`]:{marginRight:a.marginMD,fontSize:a.fontSizeLG,lineHeight:1,"&-button":{...t(a),color:a.pageHeaderBackColor,cursor:"pointer"}},[`${i}-divider-vertical`]:{height:"14px",margin:`0 ${a.marginSM}`,verticalAlign:"middle"},[`${i}-breadcrumb + &-heading`]:{marginTop:a.marginXS},[`${e}-heading`]:{display:"flex",justifyContent:"space-between","&-left":{display:"flex",alignItems:"center",margin:`${a.marginXS/2}px 0`,overflow:"hidden"},"&-title":{marginRight:a.marginSM,marginBottom:0,color:a.colorTextHeading,fontWeight:600,fontSize:a.pageHeaderHeadingTitle,lineHeight:`${a.controlHeight}px`,...r},[`${i}-avatar`]:{marginRight:a.marginSM},"&-sub-title":{marginRight:a.marginSM,color:a.colorTextDescription,fontSize:a.pageHeaderHeadingSubTitle,lineHeight:a.lineHeight,...r},"&-extra":{margin:`${a.marginXS/2}px 0`,whiteSpace:"nowrap","> *":{marginLeft:a.marginSM,whiteSpace:"unset"},"> *:first-child":{marginLeft:0}}},[`${e}-content`]:{paddingTop:a.pageHeaderContentPaddingVertical},[`${e}-footer`]:{marginTop:a.marginMD,[`${i}-tabs`]:{[`> ${i}-tabs-nav`]:{margin:0,"&::before":{border:"none"}},[`${i}-tabs-tab`]:{paddingTop:a.paddingXS,paddingBottom:a.paddingXS,fontSize:a.pageHeaderTabFontSize}}},[`${e}-compact ${e}-heading`]:{flexWrap:"wrap"},[`&${a.componentCls}-rtl`]:{direction:"rtl"}}}},H=d("PageHeader",a=>{const e=n(a,{pageHeaderPadding:a.paddingLG,pageHeaderPaddingVertical:a.paddingMD,pageHeaderPaddingBreadcrumb:a.paddingSM,pageHeaderContentPaddingVertical:a.paddingSM,pageHeaderBackColor:a.colorTextBase,pageHeaderGhostBg:"transparent",pageHeaderHeadingTitle:a.fontSizeHeading4,pageHeaderHeadingSubTitle:a.fontSize,pageHeaderTabFontSize:a.fontSizeLG});return[o(e)]});export{H as default};
