<?php
/**
 * @author 1902 Software
 * @copyright Copyright © 2023 1902 Software (https://1902software.com/magento/)
 * @package WriteTextAI_WriteTextAI
 */
?>

<?php

use WriteTextAI\WriteTextAI\Model\OptionSource\Filter\Fields;

$fields = [
    Fields::PAGE_TITLE,
    Fields::PAGE_DESCRIPTION,
    Fields::PRODUCT_DESCRIPTION,
    Fields::EXCERPT
];

if ($block->getData('custom_open_graph')) {
    $fields[] = Fields::OPEN_GRAPH;
}
?>

<meta name="wtai-pid"
    data-platform="Magento"
    content="<?= $block->escapeHtmlAttr($block->getProduct()->getId()) ?>"
/>
<meta name="wtai-sid"
    data-platform="Magento"
    content="<?= $block->escapeHtmlAttr($block->getProduct()->getStoreId()) ?>"
/>
<meta name="wtai-fid"
    data-platform="Magento"
    content="<?= $block->escapeHtmlAttr(implode(',', $fields)) ?>"
/>