<?php
namespace Components\Data\Mock;

use Components\Data\Contracts\TemplateCouponProvider;

class MockTemplateCouponProvider implements TemplateCouponProvider
{
    public function templates($include_empty = true, $withCount = false): array
    {
        $items = [
            [
                'id' => 1,
                'code' => 'welcome_10',
                'codeMain' => 'welcome_10',
                'name' => 'Welcome 10% Off',
                'label' => 'Welcome 10% Off (welcome_10)',
                'typeLabel' => '10% Discount',
                'type' => 'P',
                'amount' => 10,
                'generated_count' => 100,
            ],
            [
                'id' => 2,
                'code' => 'birthday_surprise',
                'codeMain' => 'birthday_surprise',
                'name' => 'Birthday Surprise',
                'label' => 'Birthday Surprise (birthday_surprise)',
                'typeLabel' => '20% Discount',
                'type' => 'P',
                'amount' => 20,
                'generated_count' => 50,
            ],
            [
                'id' => 3,
                'code' => 'winback_15',
                'codeMain' => 'winback_15',
                'name' => 'Win‑Back 15% Off',
                'label' => 'Win‑Back 15% Off (winback_15)',
                'typeLabel' => '15% Discount',
                'type' => 'P',
                'amount' => 15,
                'generated_count' => 75,
            ],
            [
                'id' => 4,
                'code' => 'free_ship_weekend',
                'codeMain' => 'free_ship_weekend',
                'name' => 'Free Shipping Weekend',
                'label' => 'Free Shipping Weekend (free_ship_weekend)',
                'typeLabel' => 'Free Shipping',
                'type' => 'S',
                'amount' => 0,
                'generated_count' => 120,
            ],
            [
                'id' => 5,
                'code' => '5_euro_off',
                'codeMain' => '5_euro_off',
                'name' => 'Save 5 Euro',
                'label' => 'Save 5 Euro (5_euro_off)',
                'typeLabel' => '5Euro Discount',
                'type' => 'F',
                'amount' => 0,
                'generated_count' => 30,
            ],
            [
                'id' => 6,
                'code' => 'vip_exclusive',
                'codeMain' => 'vip_exclusive',
                'name' => 'VIP Exclusive',
                'label' => 'VIP Exclusive (vip_exclusive)',
                'typeLabel' => '25% Discount',
                'type' => 'P',
                'amount' => 25,
                'generated_count' => 15,
            ],
        ];

        if (!$withCount) {
            foreach ($items as &$item) {
                $item['generated_count'] = -1;
            }
        }

        return $items;
    }
}
