/**
 * Template Marketplace
 *
 * Community template sharing with ratings, reviews, and moderation.
 *
 * @since v1.69.4
 */
import type { ConfigTemplate, TemplateCategory, TemplateSearchOptions } from './template-types.js';
/**
 * Marketplace template (extended with community data)
 */
export interface MarketplaceTemplate extends ConfigTemplate {
    marketplace: {
        publishedAt: string;
        updatedAt: string;
        downloads: number;
        rating: number;
        ratingCount: number;
        verified: boolean;
        featured: boolean;
        trending: boolean;
    };
}
/**
 * Template review
 */
export interface TemplateReview {
    id: string;
    templateId: string;
    userId: string;
    username: string;
    rating: number;
    title: string;
    content: string;
    createdAt: string;
    updatedAt?: string;
    helpful: number;
    verified: boolean;
}
/**
 * Author profile
 */
export interface AuthorProfile {
    id: string;
    username: string;
    displayName: string;
    bio?: string;
    website?: string;
    templateCount: number;
    totalDownloads: number;
    averageRating: number;
    verified: boolean;
    joinedAt: string;
}
/**
 * Featured collection
 */
export interface FeaturedCollection {
    id: string;
    name: string;
    description: string;
    templates: string[];
    curator: string;
    createdAt: string;
    featured: boolean;
}
/**
 * Submission status
 */
export type SubmissionStatus = 'pending' | 'approved' | 'rejected' | 'needs_revision';
/**
 * Template submission
 */
export interface TemplateSubmission {
    id: string;
    template: ConfigTemplate;
    authorId: string;
    status: SubmissionStatus;
    submittedAt: string;
    reviewedAt?: string;
    reviewerNotes?: string;
    version: string;
    changelog?: string;
}
/**
 * Marketplace search options
 */
export interface MarketplaceSearchOptions extends TemplateSearchOptions {
    featured?: boolean;
    trending?: boolean;
    verified?: boolean;
    minRating?: number;
    minDownloads?: number;
}
/**
 * Marketplace service
 */
export declare class TemplateMarketplace {
    private templates;
    private reviews;
    private authors;
    private collections;
    private submissions;
    private userRatings;
    constructor();
    /**
     * Search marketplace templates
     */
    search(options?: MarketplaceSearchOptions): {
        templates: MarketplaceTemplate[];
        total: number;
        hasMore: boolean;
    };
    /**
     * Get template by ID
     */
    get(id: string): MarketplaceTemplate | undefined;
    /**
     * Get featured templates
     */
    getFeatured(limit?: number): MarketplaceTemplate[];
    /**
     * Get trending templates
     */
    getTrending(limit?: number): MarketplaceTemplate[];
    /**
     * Get new templates (last 30 days)
     */
    getNew(limit?: number): MarketplaceTemplate[];
    /**
     * Get top rated templates
     */
    getTopRated(limit?: number, minRatings?: number): MarketplaceTemplate[];
    /**
     * Get templates by author
     */
    getByAuthor(authorId: string): MarketplaceTemplate[];
    /**
     * Get templates by category
     */
    getByCategory(category: TemplateCategory, limit?: number): MarketplaceTemplate[];
    /**
     * Get reviews for template
     */
    getReviews(templateId: string, sortBy?: 'recent' | 'helpful'): TemplateReview[];
    /**
     * Add review
     */
    addReview(review: TemplateReview): boolean;
    /**
     * Rate template (1-5)
     */
    rateTemplate(userId: string, templateId: string, rating: number): boolean;
    /**
     * Get user's rating for template
     */
    getUserRating(userId: string, templateId: string): number | undefined;
    /**
     * Get author profile
     */
    getAuthor(id: string): AuthorProfile | undefined;
    /**
     * Register author
     */
    registerAuthor(profile: AuthorProfile): void;
    /**
     * Get top authors
     */
    getTopAuthors(limit?: number): AuthorProfile[];
    /**
     * Get featured collections
     */
    getFeaturedCollections(): FeaturedCollection[];
    /**
     * Get collection
     */
    getCollection(id: string): FeaturedCollection | undefined;
    /**
     * Create collection
     */
    createCollection(collection: FeaturedCollection): void;
    /**
     * Get templates in collection
     */
    getCollectionTemplates(collectionId: string): MarketplaceTemplate[];
    /**
     * Submit template for review
     */
    submitTemplate(submission: TemplateSubmission): void;
    /**
     * Get submission
     */
    getSubmission(id: string): TemplateSubmission | undefined;
    /**
     * Get pending submissions
     */
    getPendingSubmissions(): TemplateSubmission[];
    /**
     * Approve submission
     */
    approveSubmission(submissionId: string): boolean;
    /**
     * Reject submission
     */
    rejectSubmission(submissionId: string, notes: string): boolean;
    /**
     * Record download
     */
    recordDownload(templateId: string): void;
    /**
     * Publish template directly (admin)
     */
    publish(template: MarketplaceTemplate): void;
    /**
     * Set featured status
     */
    setFeatured(templateId: string, featured: boolean): boolean;
    /**
     * Set trending status
     */
    setTrending(templateId: string, trending: boolean): boolean;
    /**
     * Set verified status
     */
    setVerified(templateId: string, verified: boolean): boolean;
    /**
     * Get statistics
     */
    getStats(): {
        totalTemplates: number;
        totalDownloads: number;
        totalAuthors: number;
        totalReviews: number;
    };
    /**
     * Clear all data
     */
    clear(): void;
    private updateTemplateRating;
}
/**
 * Create a new template marketplace
 */
export declare function createTemplateMarketplace(): TemplateMarketplace;
/**
 * Get template marketplace singleton
 */
export declare function getTemplateMarketplace(): TemplateMarketplace;
/**
 * Reset template marketplace singleton
 */
export declare function resetTemplateMarketplace(): void;
//# sourceMappingURL=template-marketplace.d.ts.map