"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.SecurityButton=void 0;const jsx_runtime_1=require("react/jsx-runtime"),styled_components_1=__importDefault(require("styled-components")),theme_1=require("@redocly/theme");function SecurityButton({securities:e,onClick:t}){return(0,jsx_runtime_1.jsxs)(StyledButton,{onClick:t,children:[(0,jsx_runtime_1.jsx)(theme_1.SecurityIcon,{}),(0,jsx_runtime_1.jsx)(Title,{children:"Security:"}),(0,jsx_runtime_1.jsx)(SecurityList,{children:e.map((t=>{const n=e.length>1&&t.schemes.length>1;return`\n          ${n?"(":""}\n          ${t.schemes.map((({id:e})=>e)).join(" and ")}\n          ${n?")":""}\n          `})).join(" or ")})]})}exports.SecurityButton=SecurityButton;const StyledButton=styled_components_1.default.button`
  display: flex;
  align-items: center;
  align-self: flex-start;
  gap: var(--spacing-xxs);
  min-height: 32px;
  background: var(--color-info-bg);
  padding: 0 var(--spacing-xs);
  margin-top: var(--spacing-base);
  color: var(--link-color-primary);
  border: none;
  font-size: var(--font-size-base);
  font-family: var(--font-family-base);
  line-height: var(--line-height-base);
  border-radius: var(--border-radius-md);
  max-width: 100%;
`,Title=styled_components_1.default.span`
  font-family: var(--font-family-monospaced);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.5px;
`,SecurityList=styled_components_1.default.span`
  flex: 1;
  cursor: pointer;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
`;
//# sourceMappingURL=SecurityButton.js.map