export function generateFaqSchema(questions: Record<string, { question: string; answer: string }>) {
    return {
        '@type': 'FAQPage',
        mainEntity: Object.values(questions).map((item) => ({
            '@type': 'Question',
            name: item.question,
            acceptedAnswer: {
                '@type': 'Answer',
                text: item.answer,
            },
        })),
    };
}

export function generateSoftwareAppSchema(
    name: string,
    description: string,
    imagePath: string,
    applicationCategory: string = 'UtilitiesApplication'
) {
    return {
        '@type': 'SoftwareApplication',
        name,
        applicationCategory,
        operatingSystem: 'Web Browser',
        image: `https://www.qrmaster.net${imagePath}`,
        offers: {
            '@type': 'Offer',
            price: '0',
            priceCurrency: 'USD',
            availability: 'https://schema.org/InStock',
            priceValidUntil: '2026-12-31',
        },

        description,
    };
}
