"use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&__createBinding(t,e,r);return __setModuleDefault(t,e),t};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Tabs=void 0;const jsx_runtime_1=require("react/jsx-runtime"),styled_components_1=__importStar(require("styled-components")),theme_1=require("@redocly/theme");function Tabs({tabs:e,onChange:t,activeTab:r}){return(0,jsx_runtime_1.jsx)(TabList,{children:e.map((e=>(0,jsx_runtime_1.jsx)(Tab,{$active:e.key===(null==r?void 0:r.key),onClick:()=>t(e),children:(0,jsx_runtime_1.jsx)(theme_1.StatusCode,{status:e.key,children:e.title})},e.key)))})}exports.Tabs=Tabs;const TabList=styled_components_1.default.ol`
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
`,Tab=styled_components_1.default.li`
  display: inline-flex;
  align-items: center;
  list-style: none;

  padding: 0 var(--spacing-sm);
  background-color: transparent;
  height: 24px;
  border-radius: var(--border-radius);
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-base);

  &,
  button {
    color: var(--text-color-secondary);

    ${({$active:e})=>e?styled_components_1.css`
            color: var(--text-color-primary);
            background-color: var(--tab-bg-color-filled);
          `:styled_components_1.css`
            &:hover {
              color: var(--text-color-primary);
            }
          `}
  }
`;
//# sourceMappingURL=Tabs.js.map