"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Security=void 0;const jsx_runtime_1=require("react/jsx-runtime"),react_1=require("react"),theme_1=require("@redocly/theme"),SecurityButton_1=require("./SecurityButton"),SecurityModal_1=require("./SecurityModal");function Security({securities:e}){const[t,r]=(0,react_1.useState)(!1);return(0,theme_1.useModalScrollLock)(t),e.length?(0,jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment,{children:[(0,jsx_runtime_1.jsx)(SecurityButton_1.SecurityButton,{securities:e,onClick:()=>r(!0)}),t&&(0,jsx_runtime_1.jsx)(theme_1.Portal,{mountId:"api-content",children:(0,jsx_runtime_1.jsx)(SecurityModal_1.SecurityModal,{securities:e,onClose:()=>r(!1)})})]}):null}exports.Security=Security;
//# sourceMappingURL=Security.js.map