1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.useSelection = useSelection;
|
4 | const useMulti_js_1 = require("./selection/useMulti.js");
|
5 | const useRange_js_1 = require("./selection/useRange.js");
|
6 | const useSingle_js_1 = require("./selection/useSingle.js");
|
7 | function useSelection(props, dateLib) {
|
8 | const single = (0, useSingle_js_1.useSingle)(props, dateLib);
|
9 | const multi = (0, useMulti_js_1.useMulti)(props, dateLib);
|
10 | const range = (0, useRange_js_1.useRange)(props, dateLib);
|
11 | switch (props.mode) {
|
12 | case "single":
|
13 | return single;
|
14 | case "multiple":
|
15 | return multi;
|
16 | case "range":
|
17 | return range;
|
18 | default:
|
19 | return undefined;
|
20 | }
|
21 | }
|
22 |
|
\ | No newline at end of file |