import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
import React from "react";
import Cascader from "../cascader/index";
import { ComponentDefaults } from "../../utils/typings";
var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
    visible: false,
    type: 'custom',
    options: [],
    optionKey: {
        textKey: 'text',
        valueKey: 'value',
        childrenKey: 'children'
    },
    format: {},
    height: '200px'
});
export var CustomRender = function(props) {
    var _ref = _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 = _object_without_properties(_ref, [
        "children",
        "visible",
        "type",
        "height",
        "options",
        "title",
        "left",
        "value",
        "defaultValue",
        "optionKey",
        "format",
        "onClose",
        "onChange",
        "onPathChange"
    ]);
    return /*#__PURE__*/ React.createElement(React.Fragment, null, type === 'custom' && /*#__PURE__*/ React.createElement(Cascader, _object_spread({
        visible: visible,
        value: value,
        defaultValue: defaultValue,
        title: title,
        left: left,
        options: options,
        format: format,
        optionKey: optionKey,
        onClose: function() {
            onClose === null || onClose === void 0 ? void 0 : onClose();
        },
        onChange: function(val, params) {
            onChange === null || onChange === void 0 ? void 0 : onChange(val, params);
        },
        onPathChange: onPathChange
    }, rest)));
};
