"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ExpandAllButton=void 0;const jsx_runtime_1=require("react/jsx-runtime"),styled_components_1=__importDefault(require("styled-components")),theme_1=require("@redocly/theme"),index_1=require("jotai/index"),operation_1=require("../../jotai/operation"),hooks_1=require("../../hooks"),ExpandAllButton=({operationPointer:e,type:t})=>{const o=(0,hooks_1.useTranslate)(),[n,l]=(0,index_1.useAtom)((0,operation_1.operationStore)(e)),i=(0,hooks_1.useOtelTelemetry)();return(0,jsx_runtime_1.jsx)(StyledButton,{icon:(0,jsx_runtime_1.jsx)(theme_1.MaximizeIcon,{}),iconPosition:"right",size:"small",variant:"ghost",onClick:()=>{const e=!n[t].expandedAll;i.send({type:"openapi_docs.expand_collapse_all.clicked",payload:{is_expanded:e}}),l({[t]:{expandedAll:e}})},children:n[t].expandedAll?o("openapi.collapseAll","Collapse all"):o("openapi.expandAll","Expand all")})};exports.ExpandAllButton=ExpandAllButton;const StyledButton=(0,styled_components_1.default)(theme_1.Button)`
  margin-left: auto;
`;
//# sourceMappingURL=ExpandAllButton.js.map