<?php

namespace App\Contracts;

use App\Exceptions\PlatformNotImplementedException;
use App\Models\AdCopy;
use App\Models\Campaign;
use App\Models\Creative;

interface PlatformAdapter
{
    /**
     * Create the campaign on the platform and return the platform's external campaign id.
     *
     * @throws PlatformNotImplementedException if this platform isn't wired up yet.
     */
    public function createCampaign(Campaign $campaign): string;

    /**
     * Attach a creative (and optional ad copy) to an already-created platform campaign,
     * returning the platform's external ad reference id.
     */
    public function attachCreative(Campaign $campaign, Creative $creative, ?AdCopy $adCopy = null): string;

    /**
     * Publish/activate the campaign on the platform.
     */
    public function publish(Campaign $campaign): void;
}
