function _define_property(obj, key, value) {
    if (key in obj) {
        Object.defineProperty(obj, key, {
            value: value,
            enumerable: true,
            configurable: true,
            writable: true
        });
    } else {
        obj[key] = value;
    }
    return obj;
}
function _object_spread(target) {
    for(var i = 1; i < arguments.length; i++){
        var source = arguments[i] != null ? arguments[i] : {};
        var ownKeys = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
            ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
                return Object.getOwnPropertyDescriptor(source, sym).enumerable;
            }));
        }
        ownKeys.forEach(function(key) {
            _define_property(target, key, source[key]);
        });
    }
    return target;
}
function _object_without_properties(source, excluded) {
    if (source == null) return {};
    var target = {}, sourceKeys, key, i;
    if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
        sourceKeys = Reflect.ownKeys(source);
        for(i = 0; i < sourceKeys.length; i++){
            key = sourceKeys[i];
            if (excluded.indexOf(key) >= 0) continue;
            if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
            target[key] = source[key];
        }
        return target;
    }
    target = _object_without_properties_loose(source, excluded);
    if (Object.getOwnPropertySymbols) {
        sourceKeys = Object.getOwnPropertySymbols(source);
        for(i = 0; i < sourceKeys.length; i++){
            key = sourceKeys[i];
            if (excluded.indexOf(key) >= 0) continue;
            if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
            target[key] = source[key];
        }
    }
    return target;
}
function _object_without_properties_loose(source, excluded) {
    if (source == null) return {};
    var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
    for(i = 0; i < sourceKeys.length; i++){
        key = sourceKeys[i];
        if (excluded.indexOf(key) >= 0) continue;
        if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
        target[key] = source[key];
    }
    return target;
}
import React from "react";
import cls from "classnames";
import { classes } from "../../DateTimePicker.tokens";
import { StyledSeparator } from "../Popover/Popover.styles";
import { ShortcutItem, ShortcutList, ShortcutsWrapper, ShortcutTitle, ShortcutTitleWrapper, StyledCell } from "./DateShortcutList.styles";
export var DateShortcutList = function DateShortcutList(_0) {
    var items = _0.items, calendarContainerHeight = _0.calendarContainerHeight, dateShortcutsPlacement = _0.dateShortcutsPlacement, dateShortcutsWidth = _0.dateShortcutsWidth, setShortcutDate = _0.setShortcutDate, rest = _object_without_properties(_0, [
        "items",
        "calendarContainerHeight",
        "dateShortcutsPlacement",
        "dateShortcutsWidth",
        "setShortcutDate"
    ]);
    return /*#__PURE__*/ React.createElement(ShortcutsWrapper, _object_spread({
        innerHeight: calendarContainerHeight,
        dateShortcutsPlacement: dateShortcutsPlacement
    }, rest), /*#__PURE__*/ React.createElement(StyledSeparator, null), /*#__PURE__*/ React.createElement(ShortcutList, {
        width: dateShortcutsWidth
    }, items.map(function(item) {
        return /*#__PURE__*/ React.createElement(ShortcutItem, {
            className: cls(_define_property({}, classes.shortcutItemDisabled, item.disabled)),
            onClick: function onClick() {
                return setShortcutDate(item.value);
            }
        }, /*#__PURE__*/ React.createElement(StyledCell, {
            contentLeft: item.contentLeft,
            contentRight: item.contentRight,
            stretching: "filled"
        }, /*#__PURE__*/ React.createElement(ShortcutTitleWrapper, null, /*#__PURE__*/ React.createElement(ShortcutTitle, null, item.label))));
    })));
};
