<?php

/** @var \Illuminate\Database\Eloquent\Factory $factory */

use App\Product;
use Faker\Generator as Faker;

$factory->define(Product::class, function (Faker $faker) {
    $images = [
        'assets/web/images/prod-1.png',
        'assets/web/images/prod-2.png',
        'assets/web/images/prod-3.png',
        'assets/web/images/prod-4.png',
        'assets/web/images/prod-5.png',
        'assets/web/images/prod-6.png',
        'assets/web/images/prod-7.png',
    ];
    shuffle($images);
    $randomImages = array_splice($images, 0, 4);

    return [
        'is_special' => $faker->randomElement([1,0]),
        'images' => $randomImages,
        'points' => [
            'ar' => [
                'Cross wire',
                'Cross wire',
                'Cross wire',
            ],
            'en' => [
                'Cross wire',
                'Cross wire',
                'Cross wire',
            ],
            'minimum' => ['1200mm', '1200mm', '1200mm'],
            'maximum' => ['2400mm', '2400mm', '2400mm'],
        ],
    ];
});
