/**
 * FloorToggle - Toggle between floor levels
 * 
 * Simple button group to switch between Floor 1 and Floor 2.
 */

interface FloorToggleProps {
    floors: Array<'floor_1' | 'floor_2'>;
    currentFloor: 'floor_1' | 'floor_2';
    onFloorChange: (floor: 'floor_1' | 'floor_2') => void;
}

export default function FloorToggle({ floors, currentFloor, onFloorChange }: FloorToggleProps) {
    return (
        <div className="flex items-center gap-2 bg-slate-100 dark:bg-slate-800 rounded-lg p-1">
            {floors.map(floor => (
                <button
                    key={floor}
                    onClick={() => onFloorChange(floor)}
                    className={`px-4 py-2 rounded-md text-sm font-medium transition-colors ${currentFloor === floor
                            ? 'bg-white dark:bg-slate-700 text-[var(--color-text-primary)] shadow-sm'
                            : 'text-slate-600 dark:text-[var(--color-text-tertiary)] hover:text-slate-900 dark:hover:text-white'
                        }`}
                    aria-label={floor === 'floor_1' ? 'Floor 1 (Ground)' : 'Floor 2 (Scaffolding)'}
                    aria-pressed={currentFloor === floor}
                >
                    {floor === 'floor_1' ? '🏢 Floor 1' : '🪜 Floor 2'}
                </button>
            ))}
        </div>
    );
}
