<?php
    $color_base = '#f6921e';
    
    $descripcion = isset($descripcion) ? $descripcion : config('metas.descripcion');
    $fullUrl = request()->fullUrl();
    $titulo = isset($titulo) ? $titulo : config('app.name');
    $site_name = config('app.name');
    
    $img = isset($imagen) ? $imagen : Vite::asset('resources/js/images/logoShare.png');
    $imagen = $img . '?dat=' . rand(100, 999);
    
    $twitter_user = config('metas.twitterUser');
    
    $autor = config('metas.author');
    $keywords = config('metas.keywords');
    
    $imagen_file = public_path($img);
    
    if (File::exists($imagen_file)) {
        $extension = 'image/' . File::extension($imagen_file);
        $imagen_data = getimagesize($imagen_file);
        $image_width = $imagen_data['0'];
        $image_height = $imagen_data['1'];
    } else {
        $extension = 'image/png';
        $image_width = 1200;
        $image_height = 630;
        $imagen = $img . '?dat=' . rand(100, 999);
    }
?>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<?php
    $indexSite = filter_var(config('parametros.robot', 0), FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
    $robotsContent = $indexSite === true ? 'index, follow' : 'noindex, nofollow';
?>
<meta name="robots" content="<?php echo e($robotsContent); ?>">


<meta name="viewport"
    content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta name="theme-color" content="<?php echo e($color_base); ?>">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="<?php echo e($color_base); ?>">
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="<?php echo e($color_base); ?>">

<meta name="author" content="<?php echo e($autor); ?>">
<meta name="keywords" content="<?php echo e($keywords); ?>">

<meta property="og:title" content="<?php echo e($titulo); ?>" />
<meta name="description" content="<?php echo e($descripcion); ?>" />

<meta property="og:image" itemprop="image" content="<?php echo e($imagen); ?>" />
<meta property="og:image:url" content="<?php echo e($imagen); ?>" />
<meta property="og:image:secure_url" content="<?php echo e($imagen); ?>" />
<meta property="og:image:alt" content="<?php echo e($titulo); ?>" />
<link itemprop="thumbnailUrl" href="<?php echo e($imagen); ?>" />

<meta property="og:image:height" content="<?php echo e($image_width); ?>" />
<meta property="og:image:width" content="<?php echo e($image_height); ?>" />
<meta property="og:image:type" content="<?php echo e($extension); ?>" />

<meta property="og:type" content="article" />
<meta property="og:url" content="<?php echo e($fullUrl); ?>" />
<meta property="og:description" content="<?php echo e($descripcion); ?>" />
<meta property="og:site_name" content="<?php echo e($site_name); ?>" />


<meta property="twitter:url" content="<?php echo e($fullUrl); ?>">
<meta name="twitter:title" content="<?php echo e($titulo); ?>">
<meta name="twitter:description" content="<?php echo e($descripcion); ?>">
<meta name="twitter:image" content="<?php echo e($imagen); ?>">
<meta name="twitter:card" content="summary_large_image" />
<meta property="twitter:domain" content="<?php echo e($fullUrl); ?>">

<meta name="twitter:site" content="<?php echo e($twitter_user); ?>" />
<meta name="twitter:creator" content="<?php echo e($twitter_user); ?>" />

<meta name="twitter:image:src" content="<?php echo e($imagen); ?>" />
<meta name="twitter:description" content="<?php echo e($descripcion); ?>" />
<?php /**PATH /var/www/html/copetrol/dev/copetrol-api-and-public/resources/views/inc/metas.blade.php ENDPATH**/ ?>