import{j as a,R as x,Y as g,O as S,g as h,Q as j,cx as b,cy as v,bv as k}from"./app-BgLa5dit.js";import{u as _}from"./kOrk-qeI.chunk.js";const D="_pillTabSelector_a6f6x_1",T="_tab_a6f6x_4",L="_minWidth_a6f6x_21",N="_radiusSmall_a6f6x_24",$="_tabLink_a6f6x_35",s={pillTabSelector:D,tab:T,minWidth:L,radiusSmall:N,tabLink:$};function u(e){var l;return a.jsxs(a.Fragment,{children:[!!e.tab.svg&&a.jsx("div",{className:e.tab.name?"pe-1":"",children:a.jsx(j,{svg:e.tab.svg,size:e.tab.svgSize})}),((l=e.formatDisplayText)==null?void 0:l.call(e,e.tab.name))??e.tab.name,typeof e.tab.count=="number"&&a.jsx("div",{className:"ps-2",children:a.jsx(b,{type:v.Count,data:e.tab.count})})]})}function A(e){const{borderRadius:l="lg"}=e,r=_();function o(t){t.analyticsData&&t.analyticsOptions&&k.logUserAction(t.analyticsData,t.analyticsOptions)}function d(t){t.active||!t.onSelect||(t.onSelect(),o(t))}function f(t){const n=t.target.value,i=e.tabs.find(y=>y.name===n);!i||i.active||(o(i),h.trigger(i.appLink))}const c=e.tabs.find(t=>t.active),m=e.forceSmallScreenDropdown||e.enableSmallScreenSupport&&(r.sm||r.xs);return a.jsxs("nav",{className:e.className??"",children:[m&&a.jsx("select",{className:"form-select",onChange:f,value:c==null?void 0:c.name,style:{minWidth:"150px"},children:e.tabs.map((t,n)=>{var i;return t.hide?a.jsx(x.Fragment,{},n):a.jsx("option",{value:t.name,children:((i=e.formatDisplayText)==null?void 0:i.call(e,t.name))??t.name},n)})}),!m&&a.jsx("ul",{className:`
          list-unstyled d-inline-block m-0 ${s.pillTabSelector}
          ${l?s.radiusSmall:""}
          ${e.listClassName}
        `,children:e.tabs.map((t,n)=>t.hide?a.jsx(x.Fragment,{},n):a.jsx("li",{className:`
                p-0 ${s.tab} ${t.active?"btn btn-dark":"btn btn-outline-dark"}
                ${t.name?s.minWidth:""} ${t.className}
              `,children:t.appLink?a.jsx(g,{appLink:t.appLink,analyticsData:t.analyticsData,analyticsOptions:t.analyticsOptions,className:`
                    cursor-pointer d-flex align-items-center justify-content-center
                    text-decoration-none text-reset px-2 text-nowrap ${s.tabLink}
                  `,children:a.jsx(u,{tab:t,formatDisplayText:e.formatDisplayText})}):a.jsx(S,{className:`
                    cursor-pointer d-flex align-items-center justify-content-center
                    text-decoration-none text-reset px-2 text-nowrap ${s.tabLink}
                  `,onClick:()=>d(t),children:a.jsx(u,{tab:t,formatDisplayText:e.formatDisplayText})})},n))})]})}export{A as P};
//# sourceMappingURL=D6bTl1fN.chunk.js.map
