@extends('admin.layouts.app')

@section('page_title', __('Dummy Import'))

@section('css')
    <link rel="stylesheet" href="{{ asset('public/dist/css/mv-common.min.css') }}">
    <link rel="stylesheet" href="{{ asset('public/dist/css/mv-form.min.css') }}">
@endsection

@section('content')
    <x-backend.mv-form-page
        page-id="dummy-import-container"
        breadcrumb-list-class="mv-form-breadcrumb-pro"
        :action="route('import.dummy.store')"
        method="post"
        form-id="dummyImportForm"
        class="form-horizontal from-class-id"
        :panel-title="__('Import Demo Data')"
    >
        <x-slot name="breadcrumb">
            <li class="mv-form-breadcrumb-pro__item">
                <a href="{{ route('dashboard') }}" class="mv-form-breadcrumb-pro__link mv-form-breadcrumb-pro__link--home" aria-label="{{ __('Dashboard') }}">
                    <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
                        <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />
                        <polyline points="9 22 9 12 15 12 15 22" />
                    </svg>
                </a>
            </li>
            <li class="mv-form-breadcrumb-pro__sep" aria-hidden="true"><span class="mv-form-breadcrumb-pro__sep-char">›</span></li>
            <li class="mv-form-breadcrumb-pro__item">
                <a href="{{ route('epz.imports') }}" class="mv-form-breadcrumb-pro__link mv-form-breadcrumb-pro__link--parent">{{ __('Import') }}</a>
            </li>
            <li class="mv-form-breadcrumb-pro__sep" aria-hidden="true"><span class="mv-form-breadcrumb-pro__sep-char">›</span></li>
            <li class="mv-form-breadcrumb-pro__item mv-form-breadcrumb-pro__item--current">
                <span class="mv-form-breadcrumb-pro__current" aria-current="page">{{ __('Demo data') }}</span>
            </li>
        </x-slot>

        <div class="mv-form-callout mv-p-12p mv-mb-24p" role="note">
            <p class="mv-form-callout__text mv-m-0">
                {{ __('It may take one minute or more to import the database. Please wait until the process is completed.') }}
            </p>
        </div>

        <section class="mv-form-section mv-m-0 mv-p-0 mv-mb-40p" aria-labelledby="mv-dummy-confirm">
            <h2 id="mv-dummy-confirm" class="mv-form-section__heading mv-m-0 mv-mb-18p">{{ __('Confirmation') }}</h2>
            <div class="mv-form-grid">
                <div class="mv-form-grid__cell mv-form-grid__cell--full">
                    <div class="form-group row">
                        <label for="confirm_import" class="control-label ltr:ps-3 rtl:pe-3">{{ __('To confirm, type "import" below.') }}</label>
                        <div class="col-sm-12">
                            <input type="text" class="form-control form-width inputFieldDesign" id="confirm_import"
                                placeholder="{{ __('Type "import"') }}" autocomplete="off">
                            <small id="dummy-import-help" class="form-text text-muted">{{ __('Type the word in lowercase exactly as shown, then use Import Now.') }}</small>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <section class="mv-form-section mv-m-0 mv-p-0 mv-mb-24p" aria-labelledby="mv-dummy-risks">
            <h2 id="mv-dummy-risks" class="mv-form-section__heading mv-m-0 mv-mb-18p">{{ __('Important') }}</h2>
            <div class="alert alert-warning mb-0">
                <strong class="d-block mb-2">
                    {{ __('You will lose all the data you have inserted, and new dummy data will be set after the import.') }}
                </strong>
                <strong class="d-block">
                    {{ __('Before performing the action, it is strongly recommended to create a full backup of your current installation (files and database)') }}
                    <a href="https://help.techvill.net/backup-martvill-files-and-database/" target="_blank" rel="noopener noreferrer">
                        <i class="feather icon-external-link" aria-hidden="true"></i> {{ __('See backup documentation') }}
                    </a>
                </strong>
            </div>
        </section>

        <section class="mv-form-section mv-m-0 mv-p-0 mv-mb-0" aria-labelledby="mv-dummy-credentials">
            <h2 id="mv-dummy-credentials" class="mv-form-section__heading mv-m-0 mv-mb-18p">{{ __('Demo login credentials') }}</h2>
            <div class="alert alert-light mb-0" role="alert">
                {{ __('After import, you need to use the following credentials to login') }}:
                <br>
                <code><strong>{{ __('Username') }}:</strong> admin@techvill.net</code>
                <br>
                <code><strong>{{ __('Password') }}:</strong> 123456</code>
            </div>
        </section>

        <x-slot name="footer">
            <div class="w-100 admin-form-actions mv-form-admin-actions--end">
                <x-backend.button.cancel :href="route('dashboard')" :label="__('Cancel')" class="all-cancel-btn" />
                <x-backend.button.save
                    type="submit"
                    variant="danger"
                    class="import_now_btn mx-2"
                    disabled
                    :label="__('Import Now')"
                />
            </div>
        </x-slot>
    </x-backend.mv-form-page>
@endsection

@section('js')
    <script src="{{ asset('public/dist/js/custom/validation.min.js') }}"></script>
    <script src="{{ asset('public/dist/js/custom/mv-form.min.js') }}"></script>
    <script src="{{ asset('Modules/Dummy/Resources/assets/js/app.min.js') }}"></script>
@endsection
