import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__ from "react/jsx-runtime";
import "react";
import * as __WEBPACK_EXTERNAL_MODULE__tachybase_schema__ from "@tachybase/schema";
import * as __WEBPACK_EXTERNAL_MODULE__emotion_css__ from "@emotion/css";
import * as __WEBPACK_EXTERNAL_MODULE_antd__ from "antd";
import * as __WEBPACK_EXTERNAL_MODULE_classnames__ from "classnames";
import * as __WEBPACK_EXTERNAL_MODULE__icon_index_mjs__ from "../../../icon/index.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__Action_Drawer_style_mjs__ from "./Action.Drawer.style.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__hooks_mjs__ from "./hooks.mjs";
function _tagged_template_literal(strings, raw) {
    if (!raw) raw = strings.slice(0);
    return Object.freeze(Object.defineProperties(strings, {
        raw: {
            value: Object.freeze(raw)
        }
    }));
}
function _templateObject() {
    const data = _tagged_template_literal([
        "\n                background: none;\n                border: none;\n              "
    ]);
    _templateObject = function() {
        return data;
    };
    return data;
}
const ActionSheet = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.observer)((props)=>{
    const { footerNodeName = 'Action.Drawer.Footer', ...others } = props;
    const { visible, setVisible, drawerProps } = (0, __WEBPACK_EXTERNAL_MODULE__hooks_mjs__.useActionContext)();
    const schema = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useFieldSchema)();
    const field = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useField)();
    const { componentCls, hashId } = (0, __WEBPACK_EXTERNAL_MODULE__Action_Drawer_style_mjs__.useStyles)();
    return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Drawer, {
        placement: "bottom",
        height: "90%",
        title: field.title,
        ...others,
        ...drawerProps,
        rootStyle: {
            ...null == drawerProps ? void 0 : drawerProps.style,
            ...null == others ? void 0 : others.style
        },
        extra: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.Fragment, {
            children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE_antd__.Button, {
                type: "text",
                icon: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__icon_index_mjs__.Icon, {
                    type: "CloseOutlined"
                }),
                className: (0, __WEBPACK_EXTERNAL_MODULE__emotion_css__.css)(_templateObject()),
                onClick: ()=>setVisible(false, true)
            })
        }),
        closable: false,
        destroyOnClose: true,
        open: visible,
        onClose: ()=>setVisible(false, true),
        rootClassName: (0, __WEBPACK_EXTERNAL_MODULE_classnames__["default"])(componentCls, hashId, null == drawerProps ? void 0 : drawerProps.className, others.className, 'reset'),
        className: "".concat(props.className, " amplifier-block"),
        children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_schema__.RecursionField, {
            basePath: field.address,
            schema: schema,
            onlyRenderProperties: true,
            filterProperties: (s)=>s['x-component'] !== footerNodeName
        })
    });
}, {
    displayName: 'ActionSheet'
});
ActionSheet.Footer = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.observer)(()=>{
    const field = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useField)();
    const schema = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useFieldSchema)();
    return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime__.jsx)(__WEBPACK_EXTERNAL_MODULE__tachybase_schema__.RecursionField, {
        basePath: field.address,
        schema: schema,
        onlyRenderProperties: true
    });
}, {
    displayName: 'ActionSheet.Footer'
});
const Action_Sheet_rslib_entry_ = ActionSheet;
export { ActionSheet, Action_Sheet_rslib_entry_ as default };
