<?php

declare(strict_types=1);

namespace App\Framework\Admin\Examples;

/**
 * Campaign Repository - Example Stub
 *
 * Stub implementation for the example CRUD controller
 * In a real implementation, this would use the EntityManager
 */
final readonly class CampaignRepository
{
    public function findAll(): array
    {
        // Stub: Return sample data
        return [];
    }

    public function findById(string $id): object
    {
        // Stub: Return sample campaign object
        return (object) [
            'id' => $id,
            'artist_name' => 'Example Artist',
            'campaign_type' => 'pre-save',
            'status' => 'active',
            'spotify_uri' => 'spotify:album:example',
            'release_date' => new \DateTime('2025-01-01'),
            'created_at' => new \DateTime(),
            'updated_at' => new \DateTime(),
            'stats' => ['total_saves' => 0],
        ];
    }

    public function create(array $data): object
    {
        // Stub: Create campaign
        return (object) ['id' => 'new-id'];
    }

    public function update(string $id, array $data): void
    {
        // Stub: Update campaign
    }

    public function delete(string $id): void
    {
        // Stub: Delete campaign
    }
}
