@if($customFields)
{!! trans('lang.main_fields') !!}
@endif
{!! Form::label('code', trans("lang.coupon_code"), ['class' => 'col-md-3 control-label text-md-right mx-1']) !!}
@if(isset($coupon['code']))

{!! $coupon->code !!}

@else {!! Form::text('code', null, ['class' => 'form-control','placeholder'=> trans("lang.coupon_code_placeholder")]) !!}
{{ trans("lang.coupon_code_help") }}
@endif
{!! Form::label('discount_type', trans("lang.coupon_discount_type"),['class' => 'col-md-3 control-label text-md-right mx-1']) !!}
{!! Form::select('discount_type', ['percent' => trans('lang.coupon_percent'),'fixed' => trans('lang.coupon_fixed')], null, ['class' => 'select2 form-control']) !!}
{{ trans("lang.coupon_discount_type_help") }}
{!! Form::label('discount', trans("lang.coupon_discount"), ['class' => 'col-md-3 control-label text-md-right mx-1']) !!}
{!! Form::number('discount', null, ['class' => 'form-control','placeholder'=> trans("lang.coupon_discount_placeholder"),'step'=>"any", 'min'=>"0"]) !!}
{!! trans("lang.coupon_discount_help") !!}
{!! Form::label('description', trans("lang.coupon_description"), ['class' => 'col-md-3 control-label text-md-right mx-1']) !!}
{!! Form::textarea('description', null, ['class' => 'form-control','placeholder'=> trans("lang.coupon_description_placeholder") ]) !!}
{{ trans("lang.coupon_description_help") }}
{!! Form::label('eServices[]', trans("lang.coupon_e_service_id"),['class' => 'col-md-3 control-label text-md-right mx-1']) !!}
{!! Form::select('eServices[]', $eService, $eServicesSelected, ['class' => 'select2 form-control', 'multiple'=>'multiple']) !!}
{{ trans("lang.coupon_e_service_id_help") }}
{!! Form::label('salons[]', trans("lang.coupon_salon_id"),['class' => 'col-md-3 control-label text-md-right mx-1']) !!}
{!! Form::select('salons[]', $salon, $salonsSelected, ['class' => 'select2 form-control', 'multiple'=>'multiple']) !!}
{{ trans("lang.coupon_salon_id_help") }}
{!! Form::label('categories[]', trans("lang.coupon_category_id"),['class' => 'col-md-3 control-label text-md-right mx-1']) !!}
{!! Form::select('categories[]', $category, $categoriesSelected, ['class' => 'select2 form-control', 'multiple'=>'multiple']) !!}
{{ trans("lang.coupon_category_id_help") }}
{!! Form::label('expires_at', trans("lang.coupon_expires_at"), ['class' => 'col-md-3 control-label text-md-right mx-1']) !!}
{!! Form::text('expires_at', null, ['class' => 'form-control datetimepicker-input','placeholder'=> trans("lang.coupon_expires_at_placeholder"), 'data-target'=>'.datepicker.expires_at','data-toggle'=>'datetimepicker','autocomplete'=>'off']) !!}
{{ trans("lang.coupon_expires_at_help") }}
{!! Form::label('enabled', trans("lang.coupon_enabled"),['class' => 'col-md-3 control-label text-md-right mx-1']) !!} {!! Form::hidden('enabled', 0, ['id'=>"hidden_enabled"]) !!}
{!! Form::checkbox('enabled', 1, null) !!}
@if($customFields)
{!! trans('lang.custom_field_plural') !!}
{!! $customFields !!}
@endif
{{trans('lang.cancel')}}