<?php

namespace Fotogenic_AI;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Fallback product media write adapter when no compat implementation is active.
 * Returns WP_Error with woocommerce_not_active / 503.
 */
final class Product_Media_Write_Adapter_Fallback implements ProductMediaWriteAdapter {
	/** @return array|\WP_Error */
	public function apply_to_target( array $target, array $attachment_ids, bool $set_featured, bool $add_gallery ) {
		unset( $target, $attachment_ids, $set_featured, $add_gallery );
		return new \WP_Error( 'woocommerce_not_active', __( 'WooCommerce is not active.', 'fotogenic-ai' ), [ 'status' => 503 ] );
	}

	/** @return array|\WP_Error */
	public function remove_attachment_from_targets( array $targets, int $attachment_id ) {
		unset( $targets, $attachment_id );
		return new \WP_Error( 'woocommerce_not_active', __( 'WooCommerce is not active.', 'fotogenic-ai' ), [ 'status' => 503 ] );
	}

}
