import { apiService } from './api';

interface DevisRenewalRequest {
    devisId: string;
    nouveaueDateValidite: string;
    modifications?: string;
}

interface DevisArchiveRequest {
    devisId: string;
    motif: string;
}

interface ClientFollowUpRequest {
    devisId: string;
    clientId: string;
    type: 'email' | 'telephone' | 'courrier';
    message: string;
}

interface ChantierCreationRequest {
    devisId: string;
    dateDebutSouhaitee: string;
    notes?: string;
}

interface FactureCreationRequest {
    devisId: string;
    type: 'FACTURE' | 'ACOMPTE';
    pourcentage?: number; // Pour les acomptes
}

class DevisActionsService {
    /**
     * Renouveler un devis expiré
     * TODO: Implement with proper API service method
     */
    async renewDevis(request: DevisRenewalRequest): Promise<void> {
        console.log('TODO: Implement renewDevis', request);
        return Promise.resolve();
    }

    /**
     * Archiver un devis
     * TODO: Implement with proper API service method
     */
    async archiveDevis(request: DevisArchiveRequest): Promise<void> {
        console.log('TODO: Implement archiveDevis', request);
        return Promise.resolve();
    }

    /**
     * Effectuer un suivi client
     * TODO: Implement with proper API service method
     */
    async followUpClient(request: ClientFollowUpRequest): Promise<void> {
        console.log('TODO: Implement followUpClient', request);
        return Promise.resolve();
    }

    /**
     * Créer un chantier à partir d'un devis accepté
     * TODO: Implement with proper API service method
     */
    async createChantierFromDevis(request: ChantierCreationRequest): Promise<void> {
        console.log('TODO: Implement createChantierFromDevis', request);
        return Promise.resolve();
    }

    /**
     * Créer une facture à partir d'un devis accepté
     * TODO: Implement with proper API service method
     */
    async createFactureFromDevis(request: FactureCreationRequest): Promise<void> {
        console.log('TODO: Implement createFactureFromDevis', request);
        return Promise.resolve();
    }
}

export default new DevisActionsService();