1 | import { useMulti } from "./selection/useMulti.js";
|
2 | import { useRange } from "./selection/useRange.js";
|
3 | import { useSingle } from "./selection/useSingle.js";
|
4 | export function useSelection(props, dateLib) {
|
5 | const single = useSingle(props, dateLib);
|
6 | const multi = useMulti(props, dateLib);
|
7 | const range = useRange(props, dateLib);
|
8 | switch (props.mode) {
|
9 | case "single":
|
10 | return single;
|
11 | case "multiple":
|
12 | return multi;
|
13 | case "range":
|
14 | return range;
|
15 | default:
|
16 | return undefined;
|
17 | }
|
18 | }
|
19 |
|
\ | No newline at end of file |