@extends('layouts.master')

@section('content')

<div class="container" style="max-width: 700px;">
	<h3 style="font-weight: 800; margin-bottom: 5px;">إضافة أغنية جديدة</h3>
	<hr>
	@include('layouts.errors')
	<form method="POST" action="/admin/request/{{$demand->id}}">
		@csrf
		<input type="hidden" name="id" value="{{$demand->id}}">

		<div class="form-group">
			<label for="artist">الفنان:</label>
			<input type="text" class="form-control" id="artist" name="artist" value="{{$demand->artist}}">
			@if ($errors->has('artist'))
			<div class="alert alert-danger mt-1">{{ $errors->first('artist') }}</div>
			@endif
		</div>

		<div class="form-group">
			<label for="title">عنوان الأغنية:</label>
			<input type="text" class="form-control" id="title" name="title" value="{{$demand->song}}">
			@if ($errors->has('title'))
			<div class="alert alert-danger mt-1">{{ $errors->first('title') }}</div>
			@endif
		</div>

		<div class="form-group">
			<label for="lyrics">الكلمات:</label>
			<textarea class="form-control" name="lyrics" rows="15">{{$demand->lyrics}}</textarea>
			@if ($errors->has('lyrics'))
			<div class="alert alert-danger mt-1">{{ $errors->first('lyrics') }}</div>
			@endif
		</div>

		<div class="form-group" style="text-align: center;">
			<button type="submit" class="btn btn-primary btn-lg btn-block">إضافة الأغنية</button>
		</div>
	</form>

	<form class="delete" method="post" action="/admin/delete/{{$demand->id}}">
		{{ method_field('DELETE') }}
		@csrf
		<button type="submit" class="btn btn-danger btn-lg btn-block">رفض الطلب</button>
	</form>
</div>

@endsection
