/** * @license * Copyright 2026 Aglyn LLC * * 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 { type ReactNode } from 'react'; import { type WeeklyHours, type WeeklyHoursInterval } from '../utils/weekly-hours'; export interface WeeklyHoursPickerProps { value: WeeklyHours; onChange: (hours: WeeklyHours) => void; /** Shown above the days, e.g. "Pickup hours". */ label?: ReactNode; helperText?: ReactNode; disabled?: boolean; /** What a day gets when it is switched on or given another interval. */ defaultInterval?: WeeklyHoursInterval; /** Word for an interval on the add button: "hours" or "window". */ intervalNoun?: string; /** * Every interval ends on the day it starts: the To menu offers only times * after From. Off by default, where a To before From runs past midnight. */ sameDay?: boolean; } /** * A week of opening hours chosen by clicking: a switch per day, and for an * open day one or more from/to times picked from a menu. Nothing is typed. */ export declare function WeeklyHoursPicker(props: WeeklyHoursPickerProps): import("react").JSX.Element; export interface OpeningHoursPickerProps extends Omit { /** Hours text, one `Mo-Fr 09:00-17:00` line per set of days. */ value: string | null | undefined; onChange: (text: string) => void; } /** * {@link WeeklyHoursPicker} over the stored hours text: reads the lines into a * week and writes the week back as lines, so what is saved is unchanged. */ export declare function OpeningHoursPicker(props: OpeningHoursPickerProps): import("react").JSX.Element; export default WeeklyHoursPicker;