{*
* 2007-2024 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author    PrestaShop SA <contact@prestashop.com>
*  @copyright 2007-2024 PrestaShop SA
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
<div id="product-associations" class="product-tab">
	<h3>{l s='Extra categories' d='Modules.Agilemultisellerpro.Product'}</h3>

	{if !$id_category_default}
		<div id="no_default_category" class="alert alert-info">
			{l s='Please select a default category.' d='Modules.Agilemultisellerpro.Product'}
		</div>
	{/if}

	<div class="form-group row">
		<label class="col-md-3 form-control-label" for="category_block">
			{l s='Assigned categories' d='Modules.Agilemultisellerpro.Product'}
		</label>

		<div class="col-md-9 js-input-column">
			<div id="category_block">
				<div id="categories_tree_box"></div>
			</div>
		</div>
	</div>

	<div class="form-group row">
		<label class="col-md-3 form-control-label" for="id_category_default">
			{l s='Main category' d='Modules.Agilemultisellerpro.Product'}
		</label>

		<div class="col-md-9 js-input-column">
			<select id="id_category_default" class="form-control form-control-select" name="id_category_default">
				{foreach from=$field.availableValues.selected_cat item=cat}
					<option value="{$cat.id_category|intval}" {if $id_category_default == $cat.id_category}selected="selected"
						{/if}>{$cat.name|escape:'htmlall':'UTF-8'}</option>
				{/foreach}
			</select>

		</div>
	</div>

	{if $field.availableValues.agile_ms_edit_category}
		<div class="form-group row">
			<label class="col-md-3 form-control-label" for="id_manufacturer">
				{l s='New subcategory' d='Modules.Agilemultisellerpro.Product'}
			</label>

			<div class="col-md-9 js-input-column">
				<input id="id_new_category" class="form-control" name="new_category" type="text" placeholder="{l s='New category' d='Modules.Agilemultisellerpro.Product'}">
				<span class="form-control-comment">{l s='You can enter a name for a new category that will be automatically created and assigned to this product.' d='Modules.Agilemultisellerpro.Product'}</span>
			</div>

			{* <span> <input type="text" name="new_category" id="id_new_category">&nbsp;<==
				&nbsp;{l s='New subcategory under' d='Modules.Agilemultisellerpro.Product'}:&nbsp;</span> *}
		</div>
	{/if}

	{* Manufacturer *}
	<div class="form-group row">
		<label class="col-md-3 form-control-label" for="id_manufacturer">
			{l s='Brand' d='Modules.Agilemultisellerpro.Product'}
		</label>

		<div class="col-md-9 js-input-column">
			<select name="id_manufacturer" id="id_manufacturer" class="form-control form-control-select">
				<option value="0"> -- </option>
				{foreach $field.availableValues.manufacturers AS $manufacturer}
					<option value="{$manufacturer['id_manufacturer']|intval}"
						{if $product->id_manufacturer == $manufacturer['id_manufacturer']|intval}selected="selected" {/if}>
						{$manufacturer['name']|escape:'htmlall':'UTF-8'}</option>
				{/foreach}
			</select>
		</div>
	</div>

	<div class="agile-padding"> </div>
</div>
