/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ import React, { useState } from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faPlusSquare, faMinusSquare } from "@fortawesome/free-solid-svg-icons"; import Button from "../components/Button"; import { useTranslation } from "react-i18next"; export function useFullPreview(previewPanelId: string) { const [fullPreview, setFullPreview] = useState(false); const { t } = useTranslation(); const fullPreviewToggle = () => { setFullPreview(!fullPreview); }; const fullPreviewButton = fullPreview ? ( ) : ( ); return { fullPreviewToggle, fullPreviewButton, fullPreview }; }