import{r as l,j as c,u as o}from"./index-C9R49v6m.js";const s=e=>l.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",stroke:"#999999",xmlns:"http://www.w3.org/2000/svg",...e},l.createElement("g",{id:"arrowç®­å¤´"},l.createElement("path",{id:"Vector",d:"M6.33337 4L10.3334 8L6.33337 12",strokeLinecap:"round",strokeLinejoin:"round"}))),i="_icon_hkna2_1",r="_activeIcon_hkna2_12",y="_extra_hkna2_19",k="_activeExtra_hkna2_24",v="_wrapper_hkna2_28",_="_block_hkna2_31",h="_lineBlock_hkna2_36",x="_tabs_hkna2_42",d="_tab_hkna2_42",w="_active_hkna2_12",b="_titleBarWrapper_hkna2_98",j="_showKey_hkna2_122",m="_more_hkna2_138",u="_arrow_hkna2_150",a={icon:i,activeIcon:r,extra:y,activeExtra:k,wrapper:v,block:_,lineBlock:h,tabs:x,tab:d,active:w,titleBarWrapper:b,showKey:j,more:m,arrow:u},B=e=>{const n=o();return e.titleActiveColor?document.documentElement.style.setProperty("--title-active-color",e.titleActiveColor):document.documentElement.style.setProperty("--title-active-color","var(--primary-color)"),c.jsxs("div",{className:a.titleBarWrapper,style:{...e.borderStyle,justifyContent:e.align},children:[e.options.map(t=>c.jsxs("div",{className:"".concat(a.tab," ").concat(e.activeKey===t.key?a.active:""),style:{fontWeight:e.activeKey===t.key?e.titleActWeight||"bold":"",borderBottom:e.activeKey===t.key?e.titleActiveBorder:"",...e.itemStyle||{},...e.activeKey===t.key?{}:e.defaultItemStyle},onClick:()=>e.onChange(t.key,t),children:[t.icon&&c.jsx("span",{className:"".concat(a.icon," ").concat(e.activeKey===t.key?a.activeIcon:""),children:t.icon}),t.title,e.showKey&&e.activeKey===t.key&&c.jsx("div",{className:a.showKey,children:t.key}),c.jsx("span",{style:e.enNameStyle,children:t.enName}),t.extra?c.jsx("span",{className:"".concat(a.extra," ").concat(e.activeKey===t.key?a.activeExtra:""),children:t.extra}):null]},t.key)),e.showMore?c.jsxs("div",{className:a.more,onClick:()=>{n(e.morePath)},children:["更多",c.jsx(s,{className:a.arrow})]}):""]})},E=e=>{var n;return c.jsxs("div",{className:a.wrapper,style:e.blockPosition==="left"?{display:"flex"}:{},children:[e.blockPosition!=="left"?c.jsx("div",{className:a.block}):c.jsx("div",{className:a.lineBlock}),c.jsx("div",{className:a.tabs,children:(n=e.options)==null?void 0:n.map(t=>c.jsx("div",{className:"".concat(a.tab," ").concat(e.activeKey===t.key?a.active:""),onClick:()=>e.onChange(t.key,t),style:e.activeKey===t.key?e.activeBackStyle:e.backStyle,children:t.title},t.key))})]})};export{s as S,B as T,E as a};
