import { ActionSheetDefaultProps } from './props';
import fmtEvent from '../_util/fmtEvent';
import '../_util/assert-component2';
Component({
    props: ActionSheetDefaultProps,
    methods: {
        onAction: function (e) {
            var _a = e.target.dataset, item = _a.item, index = _a.index;
            if (item === null || item === void 0 ? void 0 : item.disabled)
                return;
            var _b = this.props, onClose = _b.onClose, onAction = _b.onAction;
            var event = fmtEvent(this.props, e);
            onClose === null || onClose === void 0 ? void 0 : onClose(event);
            onAction === null || onAction === void 0 ? void 0 : onAction(item, index, event);
        },
        onClose: function (e) {
            var onClose = this.props.onClose;
            var event = fmtEvent(this.props, e);
            onClose === null || onClose === void 0 ? void 0 : onClose(event);
        },
    },
});
