
<?php
    $sg = $seoGlobal ?? [];
    $robots = !empty($sg['force_noindex']) ? 'noindex,nofollow' : ($sg['robots_default'] ?? 'index,follow');
?>

<meta name="robots" content="<?php echo e($robots); ?>">

<?php if(!empty($sg['google_verification'])): ?>
<meta name="google-site-verification" content="<?php echo e($sg['google_verification']); ?>">
<?php endif; ?>
<?php if(!empty($sg['bing_verification'])): ?>
<meta name="msvalidate.01" content="<?php echo e($sg['bing_verification']); ?>">
<?php endif; ?>
<?php if(!empty($sg['yandex_verification'])): ?>
<meta name="yandex-verification" content="<?php echo e($sg['yandex_verification']); ?>">
<?php endif; ?>

<?php if (! (View::hasSection('seo'))): ?>
    <?php if(!empty($sg['default_description'])): ?>
    <meta name="description" content="<?php echo e($sg['default_description']); ?>">
    <?php endif; ?>
    <?php if(!empty($sg['default_keywords'])): ?>
    <meta name="keywords" content="<?php echo e($sg['default_keywords']); ?>">
    <?php endif; ?>
    <meta property="og:type" content="website">
    <meta property="og:title" content="<?php echo e($documentTitle); ?>">
    <?php if(!empty($sg['default_description'])): ?>
    <meta property="og:description" content="<?php echo e($sg['default_description']); ?>">
    <?php endif; ?>
    <meta property="og:url" content="<?php echo e(url()->current()); ?>">
<?php endif; ?>

<meta property="og:site_name" content="<?php echo e($docSiteName); ?>">
<meta property="og:locale" content="fa_IR">
<?php if(!empty($sg['og_image_url'])): ?>
<meta property="og:image" content="<?php echo e($sg['og_image_url']); ?>">
<?php endif; ?>
<?php if(!empty($sg['twitter_site'])): ?>
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="<?php echo e($sg['twitter_site']); ?>">
<?php endif; ?>
<?php if(!empty($sg['facebook_app_id'])): ?>
<meta property="fb:app_id" content="<?php echo e($sg['facebook_app_id']); ?>">
<?php endif; ?>

<?php if(!empty($sg['auto_canonical'])): ?>
<link rel="canonical" href="<?php echo e(url()->current()); ?>">
<?php endif; ?>

<?php echo $__env->yieldContent('seo'); ?>

<?php if(!empty($sg['organization_ld_json'])): ?>
<script type="application/ld+json"><?php echo $sg['organization_ld_json']; ?></script>
<?php endif; ?>

<?php if(!empty($sg['gtm_id'])): ?>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','<?php echo e($sg['gtm_id']); ?>');</script>
<?php endif; ?>

<?php if(!empty($sg['ga4_id']) && empty($sg['gtm_id'])): ?>
<script async src="https://www.googletagmanager.com/gtag/js?id=<?php echo e($sg['ga4_id']); ?>"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '<?php echo e($sg['ga4_id']); ?>');
</script>
<?php endif; ?>

<?php if(!empty($sg['head_scripts'])): ?>
<?php echo $sg['head_scripts']; ?>

<?php endif; ?>
<?php /**PATH C:\xampp\htdocs2\engine\resources\views/site/partials/seo-head.blade.php ENDPATH**/ ?>