@extends('admin.layouts.layout')
@section('title', $pagePayload->title)

@section('content')
	<div class="row wrapper border-bottom white-bg page-heading">
		<div class="col-lg-10">
			<h2>{{ $pagePayload->title }}</h2>
			<ol class="breadcrumb">
				<li class="breadcrumb-item"><a href="{{ route('admin.dashboard') }}">Dashboard</a></li>
				<li class="breadcrumb-item"><a href="{{ route('admin.blogCategory.index') }}">Lista</a></li>
				<li class="breadcrumb-item active"><strong>Formulário</strong></li>
			</ol>
		</div>
		<div class="col-lg-2 col-md-2 col-sm-2" style="padding-top: 30px; text-align: right"></div>
	</div>

	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="col-lg-12">
			<div class="ibox">
				<div class="ibox-content">
					<form name="form" method="POST" action="{{ route($pagePayload->route->name, $pagePayload->route->params ?? []) }}" enctype="multipart/form-data" class="form-horizontal">
						@method($pagePayload->route->method)
						@csrf
						<input type="hidden" name="id" value="{{ $pagePayload->data->id ?? null }}" />

						<div class="form-group col-12">
							<label class="control-label">Título</label>
							<input type="text" name="name" maxlength="127" class="form-control" value="{{ old('data.name') ?? $pagePayload->data->name ?? null }}">
						</div>

						<div class="hr-line-dashed"></div>
						<div class="form-group">
							<div class="col-sm-12 text-right">
								<button class="btn btn-primary" type="submit">Salvar</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
@endsection
