"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Action = void 0;
const react_1 = __importDefault(require("react"));
const inlines_1 = require("inlines");
const components_1 = require("../../components");
const icons_1 = require("../../icons");
const Button_1 = require("../Button");
const Action = (props) => {
    const { label, children, icon, ...rest } = props;
    return (react_1.default.createElement(components_1.Modal.Root, null,
        react_1.default.createElement(components_1.Modal.Trigger, null,
            react_1.default.createElement(Button_1.Button, { color: "system", icon: icon ?? react_1.default.createElement(icons_1.IconPlus, null), ...rest }, label)),
        react_1.default.createElement(components_1.Modal.Content, null,
            label ? (react_1.default.createElement(components_1.Modal.Title, null, label)) : (react_1.default.createElement(inlines_1.styled.div, { style: { height: 16 } })),
            react_1.default.createElement(components_1.Modal.Body, null, children))));
};
exports.Action = Action;
//# sourceMappingURL=index.js.map