"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Dialog = void 0;
const tslib_1 = require("tslib");
const components_1 = require("@bluebase/components");
const Dialog_1 = tslib_1.__importDefault(require("@material-ui/core/Dialog"));
const react_native_1 = require("react-native");
const component_mapper_1 = require("@bluebase/component-mapper");
exports.Dialog = component_mapper_1.componentMapper(Dialog_1.default, {
    children: 'children',
    onClose: ({ dismissable, onDismiss }) => (_event, reason) => {
        if (!dismissable && reason === 'backdropClick') {
            return;
        }
        if (onDismiss) {
            onDismiss();
        }
    },
    open: 'visible',
    style: ({ style }) => react_native_1.StyleSheet.flatten(style),
}, { rest: true, ignore: ['dismissable'] });
exports.Dialog.defaultProps = Object.assign({ fullWidth: true }, components_1.DialogDefaultProps);
