@version(2)
@load('../../modules/admin/tpl/css/admin.bootstrap.css')
@load('../../modules/admin/tpl/css/admin.css')

<div class="x popup">
	{!! $content !!}
</div>

@if (isset($iframe_sequence) && preg_match('/^\w+$/', $iframe_sequence))
	<script>
		const iframe_sequence = '{{ $iframe_sequence }}';
		window.opener = window.parent;
		window.close = function() {
			setTimeout(function() {
				parent.closeModal('_rx_iframe_' + iframe_sequence);
			}, 100);
		};
	</script>
	<style>
		.x.popup {
			width: 100vw; height: 100vh;
			display: flex; flex-direction: column;
		}
		.x.popup > form {
			width: 100vw; height: 100vh;
			display: flex; flex-direction: column;
			margin: 0 !important;
		}
		.x_modal-header { flex: 0 0 auto; }
		.x_modal-body { flex: 1; overflow: scroll; }
		.x_modal-footer { padding-bottom: 24px !important; }
	</style>
@else
	<script>
		jQuery(function() {
			setTimeout(setFixedPopupSize, 500);
		});
		var _isPoped = true;
	</script>
@endif
