{{ html()->form('POST', route('plans.store'))->attribute('enctype', 'multipart/form-data')->attribute('data-toggle', 'validator')->id('plan')->open()}}
{{ html()->hidden('id',$plan->id) }}
{{ html()->label(trans('messages.title') . ' *', 'title')->class('form-control-label') }}
{{ html()->text('title', $plan->title)->placeholder(trans('messages.title'))->class('form-control')->required()}}
{{ html()->label(trans('messages.type') . ' *', 'type')->class('form-control-label')}}
{{ html()->select('type', ['monthly' => __('messages.monthly'), 'yearly' => __('messages.yearly')], $plan->type)->id('type')->class('form-select select2js')->required()}}
{{ html()->label(trans('messages.duration') . ' *', 'duration')
->class('form-control-label')
}}
{{ html()->select('duration', array_combine(range(1, 12), range(1, 12)), $plan->duration)->id('duration')->class('form-select select2js')->required()}}
{{ html()->label(__('messages.amount') . ' *', 'amount')
->class('form-control-label')
}}
{{ html()->number('amount', $plan->amount)->placeholder(__('messages.amount'))->class('form-control')->required()->attribute('step', 'any')->attribute('min', 0)}}
{{ html()->label(trans('messages.status') . ' *', 'status')->class('form-control-label')}}
{{ html()->select('status', ['1' => __('messages.active'), '0' => __('messages.inactive')], $plan->status)->id('status')->class('form-select select2js')->required()}}
{{ html()->label(trans('messages.plan_limitation') . ' *', 'plan_type')->class('form-control-label')}}
@if($is_in_app_purchase_enable)
{{ html()->label(__('messages.playstore_identifier'). ' *', 'playstore_identifier')->class('form-control-label') }}
{{ html()->text('playstore_identifier', $plan->playstore_identifier ?? '')->placeholder(__('messages.playstore_identifier'))->class('form-control') ->required()}}
{{ html()->label(__('messages.appstore_identifier'). ' *', 'appstore_identifier')->class('form-control-label') }}
{{ html()->text('appstore_identifier', $plan->appstore_identifier ?? '')->placeholder(__('messages.appstore_identifier'))->class('form-control') ->required()}}
@endif
{{ html()->label(__('messages.description'), 'description')->class('form-control-label') }}
{{ html()->textarea('description', $plan->description)->class('form-control textarea')->rows(3)->placeholder(__('messages.description'))}}
@foreach($plan_limit as $key => $value)
{{ html()->label(__('messages.limit'),'service_limit')->class('form-control-label') }}
{{ html()->number("plan_limitation[$value->value][limit]", $limitValue)->placeholder(__('messages.plan_limitations', ['keyword' => __('messages.' . $value->value)]))->class('form-control')->attributes(['min' => 0,'step' => 'any']) }}
@endforeach
{{ html()->label(__('messages.trial_period'),'trial_period')->class('form-control-label') }}
{{ html()->number('trial_period', $plan->trial_period)->placeholder(__('messages.trial_period'))->class('form-control')->attributes(['min' => 0,'step' => 'any']) }}
{{ html()->submit(__('messages.save'))->class('btn btn-md btn-primary float-end') }}
{{ html()->form()->close() }}