"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "CustomRender", {
    enumerable: true,
    get: function() {
        return CustomRender;
    }
});
var _interop_require_default = require("@swc/helpers/_/_interop_require_default");
var _object_spread = require("@swc/helpers/_/_object_spread");
var _object_spread_props = require("@swc/helpers/_/_object_spread_props");
var _object_without_properties = require("@swc/helpers/_/_object_without_properties");
var _react = /*#__PURE__*/ _interop_require_default._(require("react"));
var _index = /*#__PURE__*/ _interop_require_default._(require("../cascader/index"));
var _typings = require("../../utils/typings");
var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _typings.ComponentDefaults), {
    visible: false,
    type: 'custom',
    options: [],
    optionKey: {
        textKey: 'text',
        valueKey: 'value',
        childrenKey: 'children'
    },
    format: {},
    height: '200px'
});
var CustomRender = function CustomRender(props) {
    var _ref = (0, _object_spread._)({}, defaultProps, props), children = _ref.children, visible = _ref.visible, type = _ref.type, height = _ref.height, options = _ref.options, title = _ref.title, left = _ref.left, value = _ref.value, defaultValue = _ref.defaultValue, optionKey = _ref.optionKey, format = _ref.format, onClose = _ref.onClose, onChange = _ref.onChange, onPathChange = _ref.onPathChange, rest = (0, _object_without_properties._)(_ref, [
        "children",
        "visible",
        "type",
        "height",
        "options",
        "title",
        "left",
        "value",
        "defaultValue",
        "optionKey",
        "format",
        "onClose",
        "onChange",
        "onPathChange"
    ]);
    return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, type === 'custom' && /*#__PURE__*/ _react.default.createElement(_index.default, (0, _object_spread._)({
        visible: visible,
        value: value,
        defaultValue: defaultValue,
        title: title,
        left: left,
        options: options,
        format: format,
        optionKey: optionKey,
        onClose: function onClose1() {
            onClose === null || onClose === void 0 ? void 0 : onClose();
        },
        onChange: function onChange1(val, params) {
            onChange === null || onChange === void 0 ? void 0 : onChange(val, params);
        },
        onPathChange: onPathChange
    }, rest)));
};
