@extends('layout.index', [
	'title' => __('shop.tariff_unities.title'),
	'subtitle' => __('shop.tariff_unities.list'),
	'breadcrumb' => [__('shop.tariff_unities.title')]
])

@include('boilerplate::load.select2')

@section('content')

	<nav>
		<div class="nav nav-tabs">
			<a href="#families" data-toggle="tab" class="nav-item nav-link" role="tab" aria-controls="families" aria-selected="true">
				{{ __('shop.tariff_unities.title') }}
			</a>
			<a href="#values" data-toggle="tab" class="nav-item nav-link active" role="tab" aria-controls="values" aria-selected="false">
				{{ __('shop.tariff_unities.title') }}
			</a>
		</div>
	</nav>

	<div class="tab-content mb-0">

		<div class="tab-pane fade" id="families">
			@section('content')
				@include('components.datatable', ['route' => route('Admin.Shop.TariffUnities.index'), 'model' => 'ArticleAttributefamilies'])
			@endsection
		</div>

		<div class="tab-pane fade  show active" id="values">
			@section('content')
				@component('components.card')
					@include('components.datatable', ['route' => route('Admin.Shop.ArticleAttributeValues.index'), 'model' => 'TariffUnities', 'with_filters' => true])
				@endcomponent

				@component('components.layout.modal', ['title' => 'Filtres', 'id' => 'modal-filters'])
					@include('Admin.Shop.TariffUnities.partials.filters')
				@endcomponent
			@endsection
		</div>

	</div>

@endsection

@push('scripts')
	@include('components.js.datatable', ['route' => route('Admin.Shop.TariffUnities.index'), 'model' => 'TariffUnities'])
@endpush