@extends('layouts.app')
@section('title', 'Machine Details')

@section('content')
<div class="card">
    <div class="card-header d-flex justify-content-between align-items-center">
        <h6 class="card-title mb-0">Machine Details</h6>
        <div>
            <a href="{{ route('machines.edit', $machine) }}" class="btn btn-primary btn-sm">
                <i class="fas fa-edit"></i> Edit
            </a>
            <a href="{{ route('machines.index') }}" class="btn btn-secondary btn-sm">
                <i class="fas fa-arrow-left"></i> Back to List
            </a>
        </div>
    </div>
    <div class="card-body">
        <div class="row">
            <div class="col-md-6">
                <table class="table table-borderless">
                    <tr>
                        <th width="30%">Code:</th>
                        <td>{{ $machine->code }}</td>
                    </tr>
                    <tr>
                        <th>Name:</th>
                        <td>{{ $machine->name }}</td>
                    </tr>
                    <tr>
                        <th>Capacity:</th>
                        <td>{{ $machine->capacity ?? 'Not specified' }}</td>
                    </tr>
                    <tr>
                        <th>Status:</th>
                        <td>{!! $machine->status_badge !!}</td>
                    </tr>
                    <tr>
                        <th>Created:</th>
                        <td>{{ $machine->created_at->format('M d, Y H:i') }}</td>
                    </tr>
                    <tr>
                        <th>Last Updated:</th>
                        <td>{{ $machine->updated_at->format('M d, Y H:i') }}</td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</div>
@endsection
