<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
<?php if (!$data['metRequirements']): ?>

    <?php
        $data = [
            'title'             => 'Important Information',
            'image'             => 'system-requirements',
            'type'              => 'warning',
            'message'           => 'We can\'t start your migration because Transferito requires the PHP zip module or PHP function to be enabled.',
            'additionalTitle'   => 'To use our plugin:',
            'additionalInfo'    => 'You will have enable either exec or the zip module you can check the guide below to see more information.',
            'links'             => [
                [
                    'url'           => 'https://www.namecheap.com/support/knowledgebase/article.aspx/9396/2219/how-to-enable-exec',
                    'anchorText'    => 'HOW TO ENABLE PHP exec function'
                ],
                [
                    'url'           => 'https://www.youtube.com/watch?v=WfgyusFEQp4?rel=0&modestbranding=1',
                    'anchorText'    => 'HOW TO ENABLE PHP Zip module'
                ]
            ],
            'extraInfo'         => [
                'content'   => 'If you are unsure how to enable any of these do this please contact your hosting provider.'
            ]
        ];
        include getTransferitoViewPath('parts/notice');
    ?>

<?php endif; ?>


<?php if ($data['metRequirements']): ?>

    <input type="hidden" id="cPanelCheckSecurity" value="<?php echo esc_html(wp_create_nonce('cpanel_check')); ?>">

    <div class="transferito__three-columns">
        <div class="transferito__column transferito__navigation-column">
            <?php
                $data['sidebarNavigation'] = [
                    'destinationURL'        => 'active',
                    'connectToServer'       => 'disabled',
                    'emptyItem1'            => 'disabled',
                    'emptyItem2'            => 'disabled',
                    'emptyItem3'            => 'disabled'
                ];
                include getTransferitoViewPath('parts/migration/navigation');
            ?>
        </div>
        <div id="destinationURLScreen" class="transferito__column transferito__main-column">
            <div class="transferito-text__h1">Let's get started</div>
            <div class="transferito__content-container">
                <div class="transferito-destination-url">
                    <div class="transferito-destination-url__title transferito-text__p1--bold">
                        <span class="transferito-input__required">*</span>
                        Enter the Destination URL
                    </div>
                    <div class="transferito-destination-url__content transferito-text__p--regular">
                        Is the website address, where you want to migrate your current website
                    </div>
                    <div class="transferito-destination-url__input">
                        <div class="transferito-input__dropdown-with-text">
                            <select id="domainProtocol" class="transferito-input__dropdown transferito-input__dropdown--no-border transferito-input__dropdown--border-right">
                                <option>http://</option>
                                <option>https://</option>
                            </select>
                            <input
                                id="domain"
                                class="transferito-input__text-box transferito-input__text-box--no-border transferito-input__text-box--full-width"
                                type="text"
                                value="<?php echo isset($data['url']) ? esc_url($data['url']) : ''; ?>">
                        </div>
                    </div>
                    <div class="transferito-destination-url__input transferito-destination-url__input--margin-top">

                        <label class="transferito-input__checkbox--label transferito-text__p1--bold">
                            <input type="checkbox"
                                   class="transferito-input__checkbox transferito-form-element"
                                   id="localSiteMigration"
                                   name="local_site_migration">
                            Migrate to your local environment
                        </label>
                        <div class="transferito-database-authentication__checkbox--content transferito-text__small">
                            Only check this if you want to migrate your site to your development machine
                        </div>

                    </div>
                    <div class="transferito-destination-url__action-button">
                        <button id="cpanelCheck" class="transferito-button transferito-button__primary transferito-button--small transferito__check-cpanel-availability" <?php echo isset($data['url']) ? '' : 'disabled'; ?>>CONTINUE</button>
                    </div>
                </div>
            </div>
        </div>
        <div class="transferito__column transferito__pro-tip-column">
            <?php
                $data = [
                    'mainText'  => 'Enter the exact URL or link where you want to migrate (Copy or move) your current website',
                    'secondaryText'  => [
                        'text' => 'For example enter your URL like this',
                        'items' => [
                            'www.example.com',
                            'example.com',
                            'test.example.com'
                        ]
                    ]
                ];
                include getTransferitoViewPath('parts/migration/pro-tip');
            ?>
        </div>
    </div>

    <div id="errorIncorrectModal" class="transferito__hide-element">
        <?php
            $data = [
                'image'             => 'incorrect-url',
                'type'              => 'error',
                'messageTitle'      => 'Error finding URL!',
                'message'           => 'We can not find the Destination URL that you\'ve entered, please remove the http:// or https:// from your URL and try again.',
                'closeButton'       => true,
                'additionalInfo'    => 'If you are still facing this issue our migration specialists are happy to help you resolve this issue.',
                'supportLink'       => [
                    'anchorText'    => 'Create Support Ticket',
                    'url'           => 'https://wordpress.org/support/plugin/transferito/'
                ]
            ];
            include getTransferitoViewPath('parts/notice');
        ?>
    </div>

    <div id="firstMigrationInformation" class="transferito__hide-element">
        <?php
            $data = [
                'title'             => 'Your First Migration with Transferito',
                'subTitle'          => 'What would you like to do today?',
                'cpanelAllowed'     => true,
                'videoID'           => '5saFT85LCo8',
            ];
            include getTransferitoViewPath('parts/modals/welcome-screen');
        ?>

    </div>

<?php endif; ?>



