import { Prop, toNative } from 'vue-facing-decorator';
import TsxComponent, { Component } from '../../app/vuetsx';
import './../sweetalert2/css/sweetalert2.css';

interface ModalIconWarningArgs {
	visible: boolean;
}

@Component
class ModalIconWarningComponent extends TsxComponent<ModalIconWarningArgs> implements ModalIconWarningArgs {
	@Prop() visible!: boolean;

	render(h) {
		if (!this.visible) {
			return null;
		} else {
			return (
				<div class="swal2-icon swal2-warning" style="display: block;">
					!
				</div>
			);
		}
	}
}

const ModalIconWarning = toNative(ModalIconWarningComponent);
export default ModalIconWarning;
