import { ApiSearchParams } from '../../../../templates/IndexPage/types'; export type UsePeriodSelectorReturnType = { /** * 範囲選択かどうか */ ranged: boolean; /** * 実際に反映されている値 * IndexHeaderAreaに直接表示される年月ナビの値に利用される * 単体選択の場合は、常に { start: Date, end: null } となる */ value: { start: Date | null; end: Date | null; }; /** * 表示モード(月次・日次) */ displayMode: 'monthly' | 'daily'; /** * 表示モードを切り替え可能かどうか */ canToggleDisplayMode: boolean; /** * 設定可能なショートカットの一覧 * 単体選択の場合は、常に { start: Date, end: null } となる */ shortcuts?: { key: string; label: string; date: { start: Date | null; end: Date | null; }; }[]; /** * クエリパラメーターに反映されているショートカットのキー */ shortcutQueryValue: string | undefined; /** * 実際に反映されている年月ナビのプレビュー値 * 単体選択の場合は、常に { start: string, end: '' } となる */ previewValue: { start: string; end: string; }; /** * ポップアップを閉じる際などに、渡ってきた日付を反映するための関数 * 単体選択の場合は、常に { start: Date, end: null } となる */ reflectDate: (args: { currentSelectedDate: { start: Date | null; end: Date | null; }; currentDisplayMode: 'monthly' | 'daily'; currentShortcutKey?: string; }) => void; /** * 最小日付 */ minDate?: string; /** * 最大日付 */ maxDate?: string; }; export declare const usePeriodSelector:
() => UsePeriodSelectorReturnType;