/*
 * Copyright 2025 Palantir Technologies, Inc. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import { Toggle } from "@base-ui/react/toggle";
import { ToggleGroup } from "@base-ui/react/toggle-group";
import { GridView, Properties } from "@blueprintjs/icons";
import React, { useCallback } from "react";
import styles from "./PdfViewerSidebarHeader.module.css.js";
const SIDEBAR_MODE_VALUE = Object.freeze(["thumbnails"]);
const OUTLINE_MODE_VALUE = Object.freeze(["outline"]);
export function PdfViewerSidebarHeader({
  sidebarMode,
  onSidebarModeChange
}) {
  const value = sidebarMode === "thumbnails" ? SIDEBAR_MODE_VALUE : OUTLINE_MODE_VALUE;
  const handleValueChange = useCallback(newValue => {
    if (newValue.length > 0) {
      onSidebarModeChange(newValue[0]);
    }
  }, [onSidebarModeChange]);
  return /*#__PURE__*/React.createElement("div", {
    className: styles.sidebarHeader
  }, /*#__PURE__*/React.createElement(ToggleGroup, {
    value: value,
    onValueChange: handleValueChange,
    className: styles.toggleGroup
  }, /*#__PURE__*/React.createElement(Toggle, {
    value: "thumbnails",
    className: styles.modeButton,
    "aria-label": "Page thumbnails"
  }, /*#__PURE__*/React.createElement(GridView, {
    size: 16
  })), /*#__PURE__*/React.createElement(Toggle, {
    value: "outline",
    className: styles.modeButton,
    "aria-label": "Document outline"
  }, /*#__PURE__*/React.createElement(Properties, {
    size: 16
  }))));
}
//# sourceMappingURL=PdfViewerSidebarHeader.js.map