<?php

namespace Database\Factories;

use App\Enums\PotentialClientType;
use App\Models\PotentialClient;
use Illuminate\Database\Eloquent\Factories\Factory;

class PotentialClientFactory extends Factory
{
    protected $model = PotentialClient::class;

    public function definition(): array
    {
        return [
            'type' => fake()->randomElement(PotentialClientType::cases()),
            'name' => fake()->name(),
            'phone' => fake()->phoneNumber(),
            'email' => fake()->safeEmail(),
            'address' => fake()->address(),
            'social_media' => fake()->url(),
            'website' => fake()->url(),
            'notes' => fake()->optional()->sentence(),
        ];
    }

    public function individual(): static
    {
        return $this->state(['type' => PotentialClientType::Individual]);
    }

    public function company(): static
    {
        return $this->state(['type' => PotentialClientType::Company]);
    }

    public function agency(): static
    {
        return $this->state(['type' => PotentialClientType::Agency]);
    }
}
