<?php
/*
* Plugin-Name: Product Designer App
* Plugin-URI: https://productdesignerapp.com
* Author: productdesignerapp
* Page: Products
*/

if (!defined('ABSPATH'))
{
    exit;
}
?>
<div class="row" v-if="pageAdd.show">
    <?php require_once(PDAPP_ADMIN_PLUGIN_DIR .'pages/products/add/html-left.php'); ?>

    <?php require_once(PDAPP_ADMIN_PLUGIN_DIR .'pages/products/add/html-right.php'); ?>

    <?php require_once(PDAPP_ADMIN_PLUGIN_DIR .'pages/products/add/html-center.php'); ?>

    <div class="col-12">
        <div class="text-end mb-2 d-flex align-items-center justify-content-between gap-3">
            <button type="button" class="btn w-sm btn-light border waves-effect" @click="showListProducts()">{{ langs.cancel }}</button>
            <div class="d-flex gap-2 align-items-center">
                <button type="button" class="btn w-sm btn-secondary waves-effect waves-light" :disabled="disabledSave" @click="exportProduct">
                    <span class="spinner-border spinner-border-sm me-1" role="status" aria-hidden="true" v-if="pageAdd.saving"></span>
                    {{ langs.product.export }}
                </button>
                <button type="button" class="btn w-sm btn-success waves-effect waves-light" :disabled="disabledSave" @click="saveProduct">
                    <span class="spinner-border spinner-border-sm me-1" role="status" aria-hidden="true" v-if="pageAdd.saving"></span>
                    {{ pageAdd.data.id == '' ? langs.product.save_product : langs.product.update_product }}
                </button>
            </div>
        </div>
    </div>
</div>