"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Story2 = void 0;
const react_1 = __importStar(require("react"));
const useRangeDatePicker_1 = require("./hooks/useRangeDatePicker");
const date_1 = require("../../../types/date");
const BaseDatePicker_1 = require("../BaseDatePicker");
const utils_1 = require("../../../utils");
const ThemeColor = 'gray';
const today = new date_1.PurpleDate().today;
const RangeDatePickerComponent = (hookInput) => {
    const [selectedStartDate, setSelectedStartDate] = (0, react_1.useState)(date_1.EMPTY_DATE);
    const [selectedEndDate, setSelectedEndDate] = (0, react_1.useState)(date_1.EMPTY_DATE);
    const [displayDate, setDisplayDate] = (0, react_1.useState)(today);
    const props = (0, useRangeDatePicker_1.useRangeDatePicker)(Object.assign(Object.assign({}, hookInput), { selectedStartDate,
        selectedEndDate,
        displayDate, onUpdateSelectedStartDate: setSelectedStartDate, onUpdateSelectedEndDate: setSelectedEndDate, onUpdateDisplayDate: setDisplayDate }));
    return react_1.default.createElement(BaseDatePicker_1.BaseDatePicker, Object.assign({}, props));
};
/**
 * updated 230523
 *
 * <a href="https://www.notion.so/Date-Picker-f1d8e79caa964c5d9f94015f5b6d1b54?pvs=4" target="_blank">노션페이지</a>
 * <br/>
 * 특정 날짜를 선택하거나 기간을 선택할 때 사용합니다.
 *
 */
const meta = {
    title: 'Component/DatePicker',
    component: RangeDatePickerComponent,
    tags: ['autodocs'],
};
exports.default = meta;
exports.Story2 = {
    render: (props) => react_1.default.createElement(RangeDatePickerComponent, Object.assign({}, props)),
    args: {
        disabledDates: [
            [new date_1.PurpleDate([2023, 9, 2]), new date_1.PurpleDate([2023, 9, 4])],
            [new date_1.PurpleDate([2023, 9, 27]), new date_1.PurpleDate([2023, 9, 27])],
        ],
        colorType: ThemeColor,
    },
    argTypes: {
        colorType: {
            options: utils_1.ColorTypeArray,
            control: { type: 'radio' },
        },
    },
};
exports.Story2.storyName = 'RangeDatePicker';
