<?php

declare(strict_types=1);

use Hyva\Theme\Model\ViewModelRegistry;
use Magento\Catalog\Block\Category\View;
use Magento\Catalog\ViewModel\Category\Output as CategoryOutput;
use Magento\Framework\Escaper;
use Magento\Store\Model\StoreManagerInterface;

/** @var View $block */
/** @var Escaper $escaper */
/** @var ViewModelRegistry $viewModels */
/** @var StoreManagerInterface $storeManager */

/** @var CategoryOutput $categoryOutput */
$categoryOutput = $viewModels->require(CategoryOutput::class);

$currentCategory = $block->getCurrentCategory();

$bottomContent = '';
if ($currentCategory) {
    $categoryData = $currentCategory->getData('category_bottom_category_editorup_new');
    $bottomContent = $categoryData !== null ? $categoryData : '';
}

echo $categoryOutput->categoryAttribute($currentCategory, $bottomContent, 'category_bottom_category_editorup_new');


