<?php
if (Auth('admin')->User()->dashboard_style == "light") {
    $text = "dark";
	$bg = 'light';
} else {
    $text = "light";
	$bg = 'dark';
}
?>
@extends('layouts.app')
    @section('content')
        @include('admin.topmenu')
        @include('admin.sidebar')
		<div class="main-panel">
			<div class="content bg-{{$bg}}">
				<div class="page-inner">
					<div class="mt-2 mb-4">
						<h1 class="title1 text-{{$text}}">Update Signal Plan</h1>
					</div>
					<x-danger-alert/>
                    <x-success-alert/>
					<div class="mb-5 row">
						<div class="col-lg-12 ">
                            <div class="p-3 card bg-{{$bg}}">
                                <form role="form" method="post" action="{{ route('updatesignal') }}">
                                    <div class="form-row">
                                        <div class="form-group col-md-6">
                                            <h5 class="text-{{$text}}">Signal Name</h5>
                                            <input  class="form-control text-{{$text}} bg-{{$bg}}" value="{{$plan->name}}" placeholder="Enter Plan name" type="text" name="name" required>
                                        </div>
                                        <div class="form-group col-md-6">
                                            <h5 class="text-{{$text}}">Plan price({{$settings->currency}})</h5> 
                                            <input class="form-control text-{{$text}} bg-{{$bg}}" value="{{$plan->price}}" placeholder="Enter Plan price" type="text" name="price" required>   
                                            <small class="text-{{$text}}">This is the  amount a client can pay to suscribe to the signal</small>
                                       </div>	
                                       
                                       <div class="form-group col-md-12">
                                        <input type="hidden" name="id" value="{{ $plan->id}}">
                                           <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                           <input type="submit" class="btn btn-primary" value="Update Plan">   
                                       </div>
                                    </div>
                               </form>
                            </div>
						</div>
					</div>
				</div>
			</div>
            
            <div id="durationModal" class="modal fade" role="dialog">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-body bg-{{$bg}}">
                            <h5 class="text-{{$text}}">FIRSTLY, Always preceed the time frame with a digit, that is do not write the number in letters, <br> <br> SECONDLY, always add space after the number, <br> <br> LASTLY, the first letter of the timeframe should be in CAPS and always add 's' to the timeframe even if your duration is just a day, month or year.</h5>
                            <h2 class="text-{{$text}}">Eg, 1 Days, 3 Weeks, 1 Hours, 48 Hours, 4 Months, 1 Years, 9 Months</h2>
                           
                        </div>
                    </div>
                </div>
            </div>
            <div id="topupModal" class="modal fade" role="dialog">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-body bg-{{$bg}}">
                            
                        </div>
                    </div>
                </div>
            </div>
	@endsection