import useAutomationSettings from '../../../../common/hooks-query/useAutomationSettings'; import useScrollIntoView from '../../../../common/hooks/useScrollIntoView'; import type { PanelBaseProps } from '../../panel-list/PanelList'; import * as Panel from '../../panel-utils/PanelUtils'; import AutomationSettingsForm from './AutomationSettingsForm'; import AutomationsList from './AutomationsList'; import TriggersList from './TriggersList'; export default function AutomationPanel({ location }: PanelBaseProps) { const { data, status } = useAutomationSettings(); const settingsRef = useScrollIntoView('settings', location); const triggersRef = useScrollIntoView('triggers', location); const automationsRef = useScrollIntoView('automations', location); const isLoading = status === 'pending'; const automationState = isLoading ? undefined : data.enabledAutomations; const oscInputState = isLoading ? undefined : data.enabledOscIn; return ( <> Automation
); }