import { Business } from '../models/Business';
import { Residence } from '../models/Residence';
import { Vehicle } from '../models/Vehicle';
import { Warehouse } from '../models/Warehouse';
import { PlayerInventory } from '../models/PlayerInventory';
/** Types de localisation supportés pour le transfert d'items (audit 15-04-2026) */
export type StorageLocationType = 'residence' | 'business' | 'warehouse' | 'vehicle' | 'player';
export interface TransferItemParams {
    source_location_type: StorageLocationType;
    source_location_id: string;
    destination_location_type: StorageLocationType;
    destination_location_id: string;
    inventory_id: string;
    quantity: number;
}
export interface LocationCapacity {
    location_type: StorageLocationType;
    location_id: string;
    capacity_kg: number;
    filled_kg: number;
    remaining_kg: number;
    item_count: number;
}
export declare class PropertyService {
    static getPlayerBusinesses(playerId: string): Promise<Business[]>;
    static getBusinessById(id: string, playerId: string): Promise<Business | null>;
    static createBusiness(playerId: string, data: Partial<Business>): Promise<Business>;
    static updateBusiness(id: string, playerId: string, data: Partial<Business>): Promise<Business | null>;
    /**
     * Purchase a business from the Municipalite (NPC) or another player.
     * Debits the purchase_price from the buyer's balance and transfers ownership.
     */
    static purchaseBusiness(businessId: string, buyerId: string): Promise<Business>;
    /**
     * Sell a business back (to Municipalite or marketplace).
     * Credits sale_value (70% of purchase_price) to the seller.
     */
    static sellBusiness(businessId: string, sellerId: string): Promise<Business>;
    static deleteBusiness(id: string, playerId: string): Promise<true | null>;
    static listForSale(poiType: 'business' | 'residence' | 'warehouse', id: string, sellerId: string, priceLight: number): Promise<any>;
    static unlist(poiType: 'business' | 'residence' | 'warehouse', id: string, sellerId: string): Promise<any>;
    static getPlayerResidences(playerId: string): Promise<Residence[]>;
    static getResidenceById(id: string, playerId: string): Promise<Residence | null>;
    static createResidence(playerId: string, data: Partial<Residence>): Promise<Residence>;
    static updateResidence(id: string, playerId: string, data: Partial<Residence>): Promise<Residence | null>;
    /** Set a specific residence as the active planque (deactivates all others) */
    static setPlanqueActive(residenceId: string, playerId: string): Promise<Residence>;
    static deleteResidence(id: string, playerId: string): Promise<true | null>;
    static getPlayerVehicles(playerId: string): Promise<Vehicle[]>;
    static getVehicleById(id: string, playerId: string): Promise<Vehicle | null>;
    static createVehicle(playerId: string, data: Partial<Vehicle>): Promise<Vehicle>;
    static updateVehicle(id: string, playerId: string, data: Partial<Vehicle>): Promise<Vehicle | null>;
    static deleteVehicle(id: string, playerId: string): Promise<true | null>;
    static getPlayerWarehouses(playerId: string): Promise<Warehouse[]>;
    static getWarehouseById(id: string, playerId: string): Promise<Warehouse | null>;
    static createWarehouse(playerId: string, data: Partial<Warehouse>): Promise<Warehouse>;
    static updateWarehouse(id: string, playerId: string, data: Partial<Warehouse>): Promise<Warehouse | null>;
    static deleteWarehouse(id: string, playerId: string): Promise<true | null>;
    /** Calcule la storage_condition attendue selon le type de destination */
    private static storageConditionFor;
    /**
     * Verifie que le joueur est proprietaire de l'entite a la localisation.
     * Pour 'player' (on_person), on verifie que locationId === playerId.
     */
    private static verifyOwnership;
    /**
     * Calcule dynamiquement le poids reel stocke a une localisation
     * en sommant les weight_grams * quantity de l'inventaire.
     * Ignore volontairement les champs denormalises (current_stock_kg).
     */
    private static computeFilledKg;
    /**
     * Capacite max d'une localisation, lue depuis l'entite proprietaire.
     * - residence.storage_capacity
     * - business.storage_capacity_kg
     * - warehouse.capacity
     * - vehicle.storage_capacity
     * - player/on_person : 35 kg (cf. weight_malus dans mission.service.ts)
     */
    private static computeMaxCapacityKg;
    /**
     * Retourne la capacite d'une localisation avec poids actuel dynamique.
     * Exposé via GET /api/property/capacity pour l'UI de transfert.
     */
    static getCapacity(playerId: string, locationType: StorageLocationType, locationId: string): Promise<LocationCapacity>;
    /**
     * Liste les items stockes a une localisation (via SUM dynamique).
     * Expose via GET /api/property/items.
     */
    static listItemsAtLocation(playerId: string, locationType: StorageLocationType, locationId: string): Promise<PlayerInventory[]>;
    /**
     * Transfere une quantite d'items entre deux localisations appartenant au joueur.
     * Atomique (transaction SQL), recalcule la storage_condition selon la destination,
     * verifie la capacite dynamique et rejette si l'item est hypotheque (is_listed).
     */
    static transferItem(playerId: string, params: TransferItemParams): Promise<{
        success: boolean;
        message: string;
        source_remaining: number;
        destination_remaining: number;
    }>;
}
//# sourceMappingURL=property.service.d.ts.map