import{bp as g,ao as e,aI as x,ba as h,at as S,v as b,a_ as j,dg as v,dh as k,o as _}from"./app-k0jcl5PQ.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 d(t){var l;return e.jsxs(e.Fragment,{children:[!!t.tab.svg&&e.jsx("div",{className:t.tab.name?"pe-1":"",children:e.jsx(j,{svg:t.tab.svg,size:t.tab.svgSize})}),((l=t.formatDisplayText)==null?void 0:l.call(t,t.tab.name))??t.tab.name,typeof t.tab.count=="number"&&e.jsx("div",{className:"ps-2",children:e.jsx(v,{type:k.Count,data:t.tab.count})})]})}function w(t){const{borderRadius:l="lg"}=t,r=g();function o(a){a.analyticsData&&a.analyticsOptions&&_.logUserAction(a.analyticsData,a.analyticsOptions)}function u(a){a.active||!a.onSelect||(a.onSelect(),o(a))}function f(a){const n=a.target.value,i=t.tabs.find(y=>y.name===n);!i||i.active||(o(i),b.trigger(i.appLink))}const c=t.tabs.find(a=>a.active),m=t.forceSmallScreenDropdown||t.enableSmallScreenSupport&&(r.sm||r.xs);return e.jsxs("nav",{className:t.className??"",children:[m&&e.jsx("select",{className:"form-select",onChange:f,value:c==null?void 0:c.name,style:{minWidth:"150px"},children:t.tabs.map((a,n)=>{var i;return a.hide?e.jsx(x.Fragment,{},n):e.jsx("option",{value:a.name,children:((i=t.formatDisplayText)==null?void 0:i.call(t,a.name))??a.name},n)})}),!m&&e.jsx("ul",{className:`
          list-unstyled d-inline-block m-0 ${s.pillTabSelector}
          ${l?s.radiusSmall:""}
          ${t.listClassName}
        `,children:t.tabs.map((a,n)=>a.hide?e.jsx(x.Fragment,{},n):e.jsx("li",{className:`
                p-0 ${s.tab} ${a.active?"btn btn-dark":"btn btn-outline-dark"}
                ${a.name?s.minWidth:""} ${a.className}
              `,children:a.appLink?e.jsx(h,{appLink:a.appLink,analyticsData:a.analyticsData,analyticsOptions:a.analyticsOptions,className:`
                    cursor-pointer d-flex align-items-center justify-content-center
                    text-decoration-none text-reset px-2 text-nowrap ${s.tabLink}
                  `,children:e.jsx(d,{tab:a,formatDisplayText:t.formatDisplayText})}):e.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:()=>u(a),children:e.jsx(d,{tab:a,formatDisplayText:t.formatDisplayText})})},n))})]})}export{w as P,s};
//# sourceMappingURL=DwDhXSrj.chunk.js.map
