import {Button, Flex, Switch, Text} from "@chakra-ui/react"; import {useDashboardStore} from "../../../store/useDashboardStore.jsx"; export default function IvansAlertsSettings({ widgetId, currentSettings }) { const updateSettings = useDashboardStore(state => state.updateWidgetSettings); const handleCopyToClipboard = () => { updateSettings(widgetId, {copyToClipboard: true}); } const handleVolcanoSort = (details) => { const isSort = currentSettings?.activeSorts?.volcanoSort === true; updateSettings(widgetId, { activeSorts: { ...currentSettings?.activeSorts, volcanoSort: !isSort }}); } const handleTimeSort = (details) => { const sort = currentSettings?.activeSorts?.timeSort === "desc" ? "asc" : "desc"; updateSettings(widgetId, { activeSorts: { ...currentSettings?.activeSorts, timeSort: sort }}); } return ( Sort Oldest to Newest Sort by Volcano ) }