@extends('layout.app')

@section('content')

    <section class="content">
        <div class="container-fluid">
            <div class="row">
                <div class="col-12">
                    <div class="card">
                        <div class="card-header">
                            <h3 class="card-title" style="color:#115548;">Edit Smart Device
                            </h3>
                        </div>
                        <div class="card-body">
                            <form action="{{ route('smartdevice.update', $smartDevice->id) }}" method="POST">
                                @csrf
                                @method('PUT')
                                <div class="row">
                                    <div class="col-md-3">
                                        <div class="form-group">
                                            <label for="name">Smart Device Name<span
                                                    style="color: red;">*</span></label>
                                            <input type="text" class="form-control" id="name" name="name"
                                                placeholder="Enter Smart Device Name" value="{{ $smartDevice->name }}" required>
                                        </div>
                                    </div>
                                    <div class="col-md-3">
                                        <div class="form-group">
                                            <label for="status">Status<span
                                                    style="color: red;">*</span></label>
                                            <select class="form-control" id="status" name="status" required>
                                                <option value="Active" {{ $smartDevice->status == 'Active' ? 'selected' : '' }}>Active</option>
                                                <option value="Inactive" {{ $smartDevice->status == 'Inactive' ? 'selected' : '' }}>Inactive</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="col-md-3">
                                        <button type="submit" class="btn btn-primary mt-4">Submit</button>
                                    </div>
                                </div>
                            </form>
                            
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </section>

@endsection

@section('js')

@endsection
@push('script')
@endpush

@section('ajax')
    

@endsection
