import { Alert as NativeAlert } from 'react-native';
export const Alert = {
    alert: (options) => {
        if (typeof options === 'string') {
            NativeAlert.alert(options);
        }
        else {
            const buttons = [
                {
                    text: options.confirmButtonText || 'OK',
                    onPress: () => {
                        if (options.onConfirm) {
                            options.onConfirm();
                        }
                    }
                }
            ];
            if (options.showCancelButton) {
                buttons.unshift({
                    text: options.cancelButtonText || 'Cancel',
                    style: 'cancel',
                    onPress: () => {
                        if (options.onCancel) {
                            options.onCancel();
                        }
                    }
                });
            }
            NativeAlert.alert(options.title, options.text, buttons);
        }
    }
};
//# sourceMappingURL=Alert.js.map