<?php
/**
 * Quote Repository Interface
 *
 * @package     EasyInvoice
 * @since       1.0.0
 */

namespace EasyInvoice\Interfaces;

use EasyInvoice\Models\Quote;

/**
 * Quote Repository Interface
 *
 * Defines the contract for quote repositories with extensibility for pro features.
 *
 * @since 1.0.0
 */
interface QuoteRepositoryInterface {
    /**
     * Find quote by ID
     *
     * @param int $id Quote ID
     * @return Quote|null
     */
    public function find(int $id): ?Quote;
    
    /**
     * Find all quotes
     *
     * @param array $args Query arguments
     * @return array
     */
    public function findAll(array $args = []): array;
    
    /**
     * Find all published quotes
     *
     * @param array $args Query arguments
     * @return array
     */
    public function findAllPublished(array $args = []): array;
    
    /**
     * Find quotes by status
     *
     * @param string $status Quote status
     * @return array
     */
    public function findByStatus(string $status): array;
    
    /**
     * Find all quote IDs by status
     *
     * @param string $status Quote status
     * @return array
     */
    public function findAllIdsByStatus(string $status): array;
    
    /**
     * Find quotes by client
     *
     * @param int $client_id Client ID
     * @return array
     */
    public function findByClient(int $client_id): array;
    
    /**
     * Create new quote
     *
     * @param array $data Quote data
     * @return Quote|null
     */
    public function create(array $data): ?Quote;
    
    /**
     * Update existing quote
     *
     * @param int $id Quote ID
     * @param array $data Quote data
     * @return Quote|null
     */
    public function update(int $id, array $data): ?Quote;
    
    /**
     * Delete quote
     *
     * @param int $id Quote ID
     * @return bool
     */
    public function delete(int $id): bool;
    
    /**
     * Force publish quote
     *
     * @param int $id Quote ID
     * @return bool
     */
    public function forcePublish($id);
    
    /**
     * Find published quote by ID
     *
     * @param int $id Quote ID
     * @return Quote|null
     */
    public function findPublished(int $id): ?Quote;
    
    /**
     * Update all existing draft quotes to published status
     *
     * @return int Number of quotes updated
     */
    public function updateAllExistingQuotes(): int;
    
    /**
     * Get statistics
     *
     * @return array
     */
    public function getStatistics(): array;
} 