<?php

namespace App\Services\Reports\Stickers;

class StickerPresetService
{
    public function presets(): array
    {
        $rows = [
            ['value' => '100x24.5', 'label' => 'Xsmall - 100x24.5 mm', 'ppg' => 20],
            ['value' => '60x30', 'label' => 'Small - 60x30 mm', 'ppg' => 24],
            ['value' => '102x34', 'label' => 'Medium - 102x34 mm', 'ppg' => 14],
            ['value' => '90x45', 'label' => 'Large - 90x45 mm', 'ppg' => 10],
        ];

        return array_map(static function (array $row): array {
            $row['title'] = $row['title'] ?? ($row['label'] ?? ($row['value'] . ' mm'));
            $row['text'] = $row['text'] ?? $row['title'];
            $row['per_page'] = $row['per_page'] ?? ($row['ppg'] ?? null);
            return $row;
        }, $rows);
    }
}
