@extends('layouts.app')

@section('content')
<div class="container">
    <h2 class="mb-4">Detalles de la Propiedad</h2>

    <div class="card mb-4">
        <div class="card-body">
            <h5 class="card-title">{{ $property->name }} <small class="text-muted">({{ $property->code }})</small></h5>
            <p class="card-text"><strong>Área:</strong> {{ $property->area }} m²</p>
            <p class="card-text"><strong>Precio:</strong> ${{ number_format($property->price, 2) }}</p>
            <p class="card-text"><strong>Estado:</strong> {{ ucfirst($property->status) }}</p>
            <p class="card-text"><strong>Fractional:</strong> {{ $property->fractional->name }}</p>
            <p class="card-text"><strong>Tipo de Propiedad:</strong> {{ $property->propertyType->name }}</p>
        </div>
    </div>

    <a href="{{ route('properties.index') }}" class="btn btn-secondary">Volver</a>
    <a href="{{ route('properties.edit', $property) }}" class="btn btn-primary">Editar</a>
</div>
@endsection
