import{jsx as _jsx}from"react/jsx-runtime";import styled from"styled-components";import{Button,MaximizeIcon}from"@redocly/theme";import{useAtom}from"jotai/index";import{operationStore}from"../../jotai/operation";import{useOtelTelemetry,useTranslate}from"../../hooks";export const ExpandAllButton=({operationPointer:e,type:o})=>{const t=useTranslate(),[l,n]=useAtom(operationStore(e)),a=useOtelTelemetry();return _jsx(StyledButton,{icon:_jsx(MaximizeIcon,{}),iconPosition:"right",size:"small",variant:"ghost",onClick:()=>{const e=!l[o].expandedAll;a.send({type:"openapi_docs.expand_collapse_all.clicked",payload:{is_expanded:e}}),n({[o]:{expandedAll:e}})},children:l[o].expandedAll?t("openapi.collapseAll","Collapse all"):t("openapi.expandAll","Expand all")})};const StyledButton=styled(Button)`
  margin-left: auto;
`;
//# sourceMappingURL=ExpandAllButton.js.map