@csrf @if(($method??'POST')!=='POST')@method($method)@endif
@if($bulk)<div class="mb-3"><label class="form-label" for="project">{{__('keywords.fields.project')}}</label><select id="project" name="project" class="form-select @error('project') is-invalid @enderror" required>@foreach($projects as $p)<option value="{{$p->ulid}}" @selected(old('project',$project->ulid)===$p->ulid)>{{$p->name}}</option>@endforeach</select>@error('project')<div class="invalid-feedback">{{$message}}</div>@enderror</div><div class="mb-3"><label class="form-label" for="phrases">{{__('keywords.fields.phrases')}}</label><textarea id="phrases" name="phrases" rows="8" class="form-control @error('phrases') is-invalid @enderror" required placeholder="{{__('keywords.placeholder')}}">{{old('phrases')}}</textarea><div class="form-text">{{__('keywords.bulk_limit',['count'=>100])}}</div>@error('phrases')<div class="invalid-feedback">{{$message}}</div>@enderror</div>@else<div class="mb-3"><label class="form-label" for="phrase">{{__('keywords.fields.phrase')}}</label><input id="phrase" name="phrase" maxlength="190" required class="form-control @error('phrase') is-invalid @enderror" value="{{old('phrase',$keyword->phrase)}}">@error('phrase')<div class="invalid-feedback">{{$message}}</div>@enderror</div>@endif
<div class="row g-3 mb-4">@if($bulk)<div class="col-md-3"><label class="form-label">{{__('keywords.fields.engine')}}</label><select name="search_engine" class="form-select"><option value="google">Google</option></select></div>@endif<div class="col-md-3"><label class="form-label">{{__('keywords.fields.country')}}</label><select name="country_code" class="form-select">@foreach($countries as $v=>$l)<option value="{{$v}}" @selected(old('country_code',$keyword->country_code??'TR')===$v)>{{$l}}</option>@endforeach</select></div><div class="col-md-3"><label class="form-label">{{__('keywords.fields.language')}}</label><select name="language_code" class="form-select">@foreach($languages as $v=>$l)<option value="{{$v}}" @selected(old('language_code',$keyword->language_code??'tr')===$v)>{{$l}}</option>@endforeach</select></div><div class="col-md-3"><label class="form-label">{{__('keywords.fields.device')}}</label><select name="device" class="form-select">@foreach(\App\Enums\KeywordDevice::cases() as $v)<option value="{{$v->value}}" @selected(old('device',$keyword->device->value??'desktop')===$v->value)>{{$v->label()}}</option>@endforeach</select></div>@unless($bulk)<div class="col-md-3"><label class="form-label" for="status">{{__('keywords.status')}}</label><select id="status" name="status" required class="form-select @error('status') is-invalid @enderror"><option value="active" @selected(old('status',$keyword->status->value)==='active')>{{__('states.active')}}</option><option value="inactive" @selected(old('status',$keyword->status->value)==='inactive')>{{__('states.inactive')}}</option></select>@error('status')<div class="invalid-feedback">{{$message}}</div>@enderror</div>@endunless</div><button class="btn btn-primary">{{$submit}}</button> <a class="btn btn-link" href="{{route('keywords.index',['project'=>$project->ulid])}}">{{__('keywords.cancel')}}</a>
