<?php
// Exit if accessed directly.
if (!defined('ABSPATH')) {
    exit;
}
if (!current_user_can('manage_options')) {
    wp_die('Unauthorized user');
}
?>

<div class="wp-block-greenshift-blocks-container alignfull gspb_container gspb_container-gsbp-ead11204-4841" id="gspb_container-id-gsbp-ead11204-4841">
    <div class="wp-block-greenshift-blocks-container gspb_container gspb_container-gsbp-cbc3fa8c-bb26" id="gspb_container-id-gsbp-cbc3fa8c-bb26">

        <?php $activetab = 'addons'; ?>
        <?php include(GL_DIR_PATH . 'templates/admin/navleft.php'); ?>


        <div class="wp-block-greenshift-blocks-container gspb_container gspb_container-gsbp-89d45563-1559" id="gspb_container-id-gsbp-89d45563-1559">
            <div class="wp-block-greenshift-blocks-container gspb_container gspb_container-gsbp-efb64efe-d083" id="gspb_container-id-gsbp-efb64efe-d083">
                <h2 id="gspb_heading-id-gsbp-ca0b0ada-6561" class="gspb_heading gspb_heading-id-gsbp-ca0b0ada-6561 "><?php esc_html_e("Your addons", 'gl-page-builder'); ?></h2>
            </div>


            <div class="wp-block-greenshift-blocks-container gspb_container gspb_container-gsbp-7b4f8e8f-1a69" id="gspb_container-id-gsbp-7b4f8e8f-1a69">
                <style>
                    body #gspb_container-id-gsbp-cbc3fa8c-bb26.gspb_container {
                        max-width: 1600px !important
                    }

                    .greenshift_form .form-table {
                        margin-top: 0
                    }

                    .wp-core-ui .button-primary {
                        background-color: #2184f9
                    }

                    .wrap .fs-notice {
                        margin: 0 25px 35px 25px !important
                    }

                    .wrap .fs-plugin-title {
                        display: none !important
                    }

                    .mb30 {
                        margin-bottom: 30px
                    }

                    .gs_main_text {
                        font-size: 15px;
                        margin-bottom: 12px;
                    }

                    .gs_main_text a {
                        color: #2184f9
                    }

                    a.gs_main_btn {
                        background-color: #2184f9;
                        border: 1px solid #2184f9;
                        color: #fff;
                        padding: 10px 16px;
                        border-radius: 6px;
                        text-decoration: none;
                        text-align: center
                    }

                    a.gs_sec_btn {
                        background-color: #fff;
                        color: #111;
                        border: 1px solid #ddd;
                        padding: 10px 16px;
                        border-radius: 6px;
                        text-decoration: none;
                        text-align: center
                    }
                </style>
                <style>
                    #gspb_addons .gspb-cards-list {
                        list-style: none;
                        display: flex;
                        flex-wrap: wrap;
                        gap: 30px;
                        justify-content: flex-start;
                        margin-top: 50px
                    }

                    #gspb_addons .gspb-cards-list .gspb-card {
                        height: 152px;
                        width: 290px;
                        padding: 0;
                        font-size: 14px;
                        list-style: none;
                        border: 1px solid #ddd;
                        position: relative;
                    }

                    #gspb_addons .gspb-cards-list .gspb-card .gspb-inner {
                        background-color: #fff;
                        overflow: hidden;
                        height: 100%;
                        position: relative;
                    }

                    #gspb_addons .gspb-cards-list .gspb-card .gspb-inner>ul {
                        transition: all, 0.15s;
                        left: 0;
                        right: 0;
                        top: 0;
                        position: absolute;
                    }

                    #gspb_addons .gspb-cards-list .gspb-card .gspb-inner>ul>li {
                        list-style: none;
                        line-height: 18px;
                        padding: 0 15px;
                        width: 100%;
                        display: block;
                        box-sizing: border-box;
                    }

                    #gspb_addons .gspb-cards-list .gspb-card .gspb-inner .gspb-card-banner {
                        padding: 0;
                        margin: 0;
                        display: block;
                        height: 100px;
                        background-repeat: repeat-x;
                        background-size: 100% 100%;
                        transition: all, 0.15s;
                    }

                    .gspb-badge {
                        position: absolute;
                        top: 0;
                        right: 0;
                        background: #71ae00;
                        color: white;
                        font-size: 12px;
                        line-height: 18px;
                        text-transform: uppercase;
                        padding: 2px 6px;
                        border-radius: 3px 0 0 3px;
                        border-right: 0;
                        box-shadow: 0 2px 1px -1px rgb(0 0 0 / 30%);
                    }

                    .gspb-badge-2 {
                        position: absolute;
                        top: 30px;
                    }

                    .gspb-badge-warning {
                        background-color: #cc0000
                    }

                    #gspb_addons .gspb-cards-list .gspb-card .gspb-inner .gspb-title {
                        margin: 10px 0 0 0;
                        height: 18px;
                        overflow: hidden;
                        color: #000;
                        white-space: nowrap;
                        text-overflow: ellipsis;
                        font-weight: bold;
                    }

                    #gspb_addons .gspb-cards-list .gspb-card .gspb-inner .gspb-offer {
                        font-size: 0.9em;
                    }

                    #gspb_addons .gspb-cards-list .gspb-card .gspb-inner .gspb-description {
                        background-color: #f9f9f9;
                        padding: 10px 15px 100px 15px;
                        border-top: 1px solid #eee;
                        margin: 0 0 10px 0;
                        color: #777;
                    }

                    #gspb_addons .gspb-cards-list .gspb-card .gspb-inner .gspb-cta .button,
                    #gspb_addons .gspb-cards-list .gspb-card .gspb-inner .gspb-cta .button-group {
                        position: absolute;
                        top: 112px;
                        right: 10px;
                        min-height: 20px;
                        line-height: 30px;
                        background: #2184f9;
                    }
                    .rtl #gspb_addons .gspb-cards-list .gspb-card .gspb-inner .gspb-cta .button,
                    .rtl #gspb_addons .gspb-cards-list .gspb-card .gspb-inner .gspb-cta .button-group {
                        right: auto;
                        left: 10px;
                    }

                    @media screen and (min-width: 960px) {
                        #gspb_addons .gspb-cards-list .gspb-card:hover .gspb-inner ul {
                            top: -100px;
                        }

                        #gspb_addons .gspb-cards-list .gspb-card:hover .gspb-inner .gspb-title,
                        #gspb_addons .gspb-cards-list .gspb-card:hover .gspb-inner .gspb-offer {
                            color: #29abe1;
                        }

                        #gspb_addons .gspb-cards-list .gspb-card:hover .gspb-inner .gspb-title,
                        #gspb_addons .gspb-cards-list .gspb-card:hover .gspb-inner .gspb-offer {
                            color: #29abe1;
                        }
                    }

                    /* Extra section styling */
                    #gspb_extra .gspb-cards-list {
                        list-style: none;
                        display: flex;
                        flex-wrap: wrap;
                        gap: 30px;
                        justify-content: flex-start;
                        margin-top: 50px
                    }

                    #gspb_extra .gspb-cards-list .gspb-card {
                        height: 152px;
                        width: 290px;
                        padding: 0;
                        font-size: 14px;
                        list-style: none;
                        border: 1px solid #ddd;
                        position: relative;
                    }

                    #gspb_extra .gspb-cards-list .gspb-card .gspb-inner {
                        background-color: #fff;
                        overflow: hidden;
                        height: 100%;
                        position: relative;
                    }

                    #gspb_extra .gspb-cards-list .gspb-card .gspb-inner>ul {
                        transition: all, 0.15s;
                        left: 0;
                        right: 0;
                        top: 0;
                        position: absolute;
                    }

                    #gspb_extra .gspb-cards-list .gspb-card .gspb-inner>ul>li {
                        list-style: none;
                        line-height: 18px;
                        padding: 0 15px;
                        width: 100%;
                        display: block;
                        box-sizing: border-box;
                    }

                    #gspb_extra .gspb-cards-list .gspb-card .gspb-inner .gspb-card-banner {
                        padding: 0;
                        margin: 0;
                        display: block;
                        height: 100px;
                        background-repeat: repeat-x;
                        background-size: 100% 100%;
                        transition: all, 0.15s;
                    }

                    #gspb_extra .gspb-badge {
                        position: absolute;
                        top: 0;
                        right: 0;
                        background: #71ae00;
                        color: white;
                        font-size: 12px;
                        line-height: 18px;
                        text-transform: uppercase;
                        padding: 2px 6px;
                        border-radius: 3px 0 0 3px;
                        border-right: 0;
                        box-shadow: 0 2px 1px -1px rgb(0 0 0 / 30%);
                    }

                    #gspb_extra .gspb-badge-2 {
                        position: absolute;
                        top: 30px;
                    }

                    #gspb_extra .gspb-badge-warning {
                        background-color: #cc0000
                    }

                    #gspb_extra .gspb-cards-list .gspb-card .gspb-inner .gspb-title {
                        margin: 10px 0 0 0;
                        height: 18px;
                        overflow: hidden;
                        color: #000;
                        white-space: nowrap;
                        text-overflow: ellipsis;
                        font-weight: bold;
                    }

                    #gspb_extra .gspb-cards-list .gspb-card .gspb-inner .gspb-offer {
                        font-size: 0.9em;
                    }

                    #gspb_extra .gspb-cards-list .gspb-card .gspb-inner .gspb-description {
                        background-color: #f9f9f9;
                        padding: 10px 15px 100px 15px;
                        border-top: 1px solid #eee;
                        margin: 0 0 10px 0;
                        color: #777;
                    }

                    #gspb_extra .gspb-cards-list .gspb-card .gspb-inner .gspb-cta .button,
                    #gspb_extra .gspb-cards-list .gspb-card .gspb-inner .gspb-cta .button-group {
                        position: absolute;
                        top: 112px;
                        right: 10px;
                        min-height: 20px;
                        line-height: 30px;
                        background: #2184f9;
                    }
                    .rtl #gspb_extra .gspb-cards-list .gspb-card .gspb-inner .gspb-cta .button,
                    .rtl #gspb_extra .gspb-cards-list .gspb-card .gspb-inner .gspb-cta .button-group {
                        right: auto;
                        left: 10px;
                    }

                    @media screen and (min-width: 960px) {
                        #gspb_extra .gspb-cards-list .gspb-card:hover .gspb-inner ul {
                            top: -100px;
                        }

                        #gspb_extra .gspb-cards-list .gspb-card:hover .gspb-inner .gspb-title,
                        #gspb_extra .gspb-cards-list .gspb-card:hover .gspb-inner .gspb-offer {
                            color: #29abe1;
                        }

                        #gspb_extra .gspb-cards-list .gspb-card:hover .gspb-inner .gspb-title,
                        #gspb_extra .gspb-cards-list .gspb-card:hover .gspb-inner .gspb-offer {
                            color: #29abe1;
                        }
                    }
                </style>
                <div>
                    <?php $licenses = gl_edd_check_all_licenses(); ?>
                    <?php $is_allinone = gl_edd_has_premium_access($licenses); ?>
                </div>
            </div>

            <!-- Extra Section -->

            <div class="wp-block-greenshift-blocks-container gspb_container gspb_container-gsbp-7b4f8e8f-1a69" id="gspb_container-id-gsbp-7b4f8e8f-1a69">
                <div class="greenshift_form" id="gspb_extra">
                    <p class="gs-introtext"><?php esc_html_e("Additional tools and converters to enhance your workflow", 'gl-page-builder'); ?>These tools should be installed separately as extensions for browser. Please check documentation of each tools for details</p>
                    <ul class="gspb-cards-list">
                        <li class="gspb-card gspb-addon" data-slug="figma-converter">
                            <div class="gspb-inner">
                                <ul>
                                    <li class="gspb-card-banner" style="background-image: url('<?php echo esc_url(GL_DIR_URL . '/templates/admin/img/figmamini.png'); ?>');">
                                        <?php if ($is_allinone) : ?>
                                            <span class="gspb-badge"><?php esc_html_e("Available", 'gl-page-builder'); ?></span>
                                        <?php else : ?>
                                            <span class="gspb-badge-warning gspb-badge"><?php esc_html_e("Upgrade Required", 'gl-page-builder'); ?></span>
                                        <?php endif; ?>
                                    </li>
                                    <li class="gspb-title"><?php esc_html_e("Figma Converter", 'gl-page-builder'); ?></li>
                                    <li class="gspb-offer">
                                        <span class="gspb-price"><?php esc_html_e("Extra", 'gl-page-builder'); ?></span>
                                    </li>
                                    <li class="gspb-description"><?php esc_html_e("Convert your Figma designs to Greenshift WordPress blocks in one click.", 'gl-page-builder'); ?> <br>
                                        <a class="gspb-buttonbox" href="https://greenshiftwp.com/figma-to-wordpress-greenshift/" target="_blank" rel="noopener"><?php esc_html_e("Documentation", 'gl-page-builder'); ?></a>
                                    </li>
                                    <?php if ($is_allinone) : ?>
                                        <li class="gspb-cta"><a class="button button-primary" href="https://www.figma.com/community/plugin/1479556830076771468/figma-to-wordpress-blocks-greenshift-and-greenlight" target="_blank" rel="noopener"><?php esc_html_e("Download Tool", "greenshift-animation-and-page-builder-blocks"); ?></a></li>
                                    <?php else : ?>
                                        <li class="gspb-cta"><a class="button button-primary" href="https://shop.greenshiftwp.com/downloads/all-in-one-bundle/" target="_blank"><?php esc_html_e("Upgrade to Access", "greenshift-animation-and-page-builder-blocks"); ?></a></li>
                                    <?php endif; ?>
                                </ul>
                            </div>
                        </li>
                        <li class="gspb-card gspb-addon" data-slug="html-converter">
                            <div class="gspb-inner">
                                <ul>
                                    <li class="gspb-card-banner" style="background-image: url('<?php echo esc_url(GL_DIR_URL . '/templates/admin/img/htmlmini.png'); ?>');">
                                        <?php if ($is_allinone) : ?>
                                            <span class="gspb-badge"><?php esc_html_e("Available", 'gl-page-builder'); ?></span>
                                        <?php else : ?>
                                            <span class="gspb-badge-warning gspb-badge"><?php esc_html_e("Upgrade Required", 'gl-page-builder'); ?></span>
                                        <?php endif; ?>
                                    </li>
                                    <li class="gspb-title"><?php esc_html_e("Web page to Blocks", 'gl-page-builder'); ?></li>
                                    <li class="gspb-offer">
                                        <span class="gspb-price"><?php esc_html_e("Extra", 'gl-page-builder'); ?></span>
                                    </li>
                                    <li class="gspb-description"><?php esc_html_e("Convert any webpage or HTML design to Greenshift blocks.", 'gl-page-builder'); ?> <br>
                                        <a class="gspb-buttonbox" href="https://greenshiftwp.com/any-webpage-to-wordpress-converter/" target="_blank" rel="noopener"><?php esc_html_e("Documentation", 'gl-page-builder'); ?></a>
                                    </li>
                                    <?php if ($is_allinone) : ?>
                                        <li class="gspb-cta"><a class="button button-primary" href="https://shop.greenshiftwp.com/update-server/html-to-greenlight.zip" target="_blank" rel="noopener"><?php esc_html_e("Download Tool", "greenshift-animation-and-page-builder-blocks"); ?></a></li>
                                    <?php else : ?>
                                        <li class="gspb-cta"><a class="button button-primary" href="https://shop.greenshiftwp.com/downloads/all-in-one-bundle/" target="_blank"><?php esc_html_e("Upgrade to Access", "greenshift-animation-and-page-builder-blocks"); ?></a></li>
                                    <?php endif; ?>
                                </ul>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>