<?php
/**
 * Quote Service Provider
 *
 * @package Easy_Invoice
 * @subpackage Providers
 */

namespace EasyInvoice\Providers;

use EasyInvoice\Repositories\QuoteRepository;

/**
 * QuoteServiceProvider Class
 * 
 * Handles the registration of quote-related services.
 */
class QuoteServiceProvider {
    /**
     * The repository instance
     *
     * @var QuoteRepository
     */
    protected static $repository = null;
    
    /**
     * Register quote services
     */
    public function register() {
        // Register service providers, load dependencies, etc.
        $this->registerRepositories();
        $this->registerHooks();
    }
    
    /**
     * Register repositories
     */
    protected function registerRepositories() {
        // This method would be more useful if you're using a dependency injection container
        // For now, it's just a placeholder to maintain structure for future expansion
    }
    
    /**
     * Register hooks
     */
    protected function registerHooks() {
        // Register any WordPress hooks related to quotes
    }
    
    /**
     * Register quote repository
     */
    protected function registerQuoteRepository() {
        // Create and store the repository instance
        self::$repository = new QuoteRepository();
    }
    
    /**
     * Get the quote repository
     *
     * @return QuoteRepository The quote repository
     */
    public static function getQuoteRepository() {
        // Create the repository if it doesn't exist
        if (self::$repository === null) {
            self::$repository = new QuoteRepository();
        }
        
        return self::$repository;
    }
} 