<?php

namespace Breakdance\Themeless\ManageTemplates;

function getManageBreakdancePostTypesSpaHtml()
{
?>

    <style>
        .manage-templates-spa-wrapper iframe {
            display: block;
            width: 100%;
            height: calc(100svh - var(--wp-admin--admin-bar--height));
        }

        .wrap {
            margin: 0;
        }

        #wpbody-content,
        #wpcontent {
            padding: 0;
        }

        .notice,
        div.error,
        div.updated,
        #wpfooter {
            display: none;
        }

        @media (min-width: 960px) {
            .manage-templates-spa-wrapper {
                position: fixed;
                width: calc(100% - 160px);
            }
        }
    </style>

    <?php
    $breakdance_or_oxygen = BREAKDANCE_MODE === 'oxygen' ? 'oxygen' : 'breakdance';
    ?>

    <div class="wrap">
        <div class="manage-templates-spa-wrapper">
            <iframe id="manage-templates-wrapper-iframe" width="100%" frameborder="0"
                src="<?= site_url("?" . $breakdance_or_oxygen . "=templates") ?>">
            </iframe>
        </div>
    </div>
<?php
}
