<!DOCTYPE html>
<html lang="{{ app.request.locale }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}Veterinary Clinic Management{% endblock %}</title>
<!-- Favicon -->
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🏥</text></svg>">
<!-- Google Font: Inter -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap">
<!-- Bootstrap 5 CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Bootstrap Icons CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css" rel="stylesheet">
<!-- Adminkit CSS -->
<link href="{{ asset('css/adminkit/app.css') }}" rel="stylesheet">
<!-- Custom CSS -->
{% block stylesheets %}
{{ encore_entry_link_tags('app') }}
{% endblock %}
<!-- Adminkit CSS -->
<link href="{{ asset('css/styles.css') }}" rel="stylesheet">
</head>
<body>
<div class="wrapper">
{% block body %}{% endblock %}
</div>
<!-- Toast Notifications -->
<div id="toast-container" class="toast-container position-fixed top-0 end-0 p-3" style="z-index: 1060;"></div>
<!-- Bootstrap 5 JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<!-- Adminkit JS -->
<script src="{{ asset('js/adminkit/app.js') }}"></script>
{% block javascripts %}
{{ encore_entry_script_tags('app') }}
{% endblock %}
<script>
document.addEventListener('DOMContentLoaded', () => {
const toastContainer = document.getElementById('toast-container');
if (!toastContainer) {
return;
}
window.showToast = (message, type = 'info', duration = 5000) => {
const toastWrapper = document.createElement('div');
toastWrapper.className = 'toast align-items-center text-bg-' + (type === 'error' ? 'danger' : type) + ' border-0';
toastWrapper.setAttribute('role', 'alert');
toastWrapper.setAttribute('aria-live', 'assertive');
toastWrapper.setAttribute('aria-atomic', 'true');
toastWrapper.innerHTML = `
<div class="d-flex">
<div class="toast-body">${message}</div>
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
`;
toastContainer.appendChild(toastWrapper);
const toast = new bootstrap.Toast(toastWrapper, { autohide: true, delay: duration });
toast.show();
toastWrapper.addEventListener('hidden.bs.toast', () => {
toastWrapper.remove();
});
};
{% for message in app.flashes('success') %}
window.showToast('{{ message }}', 'success', 5000);
{% endfor %}
{% for message in app.flashes('error') %}
window.showToast('{{ message }}', 'danger', 8000);
{% endfor %}
{% for message in app.flashes('warning') %}
window.showToast('{{ message }}', 'warning', 6000);
{% endfor %}
{% for message in app.flashes('info') %}
window.showToast('{{ message }}', 'info', 5000);
{% endfor %}
});
</script>
</body>
</html>