<?php
// Create file: app/Traits/HasWalkinLabel.php

namespace App\Traits;

trait HasWalkinLabel
{
    /**
     * Get the walk-in label for display.
     */
    public function getWalkinLabelAttribute(): string
    {
        if ($this->is_walk_in) {
            return 'WLK';
        }
        
        return '';
    }
    
    /**
     * Get the full display number with walk-in label.
     */
    public function getDisplayNumberAttribute(): string
    {
        if ($this->is_walk_in) {
            return 'WLK-' . ($this->walk_in_number ?: $this->reservation_number);
        }
        
        return $this->reservation_number;
    }
    
    /**
     * Get formatted reservation number with walk-in badge.
     */
    public function getFormattedReservationNumberAttribute(): string
    {
        $number = $this->is_walk_in ? 
            ($this->walk_in_number ?: 'WLK' . str_pad($this->id, 8, '0', STR_PAD_LEFT)) : 
            $this->reservation_number;
            
        return $number;
    }
}