import type { Metadata } from 'next'

import { SITE_URL } from '@/lib/seo'

const siteUrl = process.env.NEXT_PUBLIC_SITE_URL || SITE_URL

export const homeMetadata: Metadata = {
  title: 'Pounce - Domain Intelligence for Investors | The Market Never Sleeps',
  description: 'Domain intelligence for investors. Live auctions, drops, TLD price tracking, and portfolio monitoring with a clean market feed and verified listings. 0% marketplace commission.',
  keywords: [
    'domain intelligence',
    'domain marketplace',
    'domain investing',
    'domain auctions',
    'TLD pricing',
    'expired domains',
    'domain drops',
    'domain monitoring',
    'domain portfolio',
    'buy domains',
    'sell domains',
    'domain valuation',
    'premium domains',
    'domain market analysis',
  ],
  openGraph: {
    title: 'Pounce - Domain Intelligence for Investors',
    description: 'The market never sleeps. You should. Live domain intelligence, auctions, and market data.',
    url: siteUrl,
    type: 'website',
    images: [
      {
        url: `${siteUrl}/og-image.png`,
        width: 1200,
        height: 630,
        alt: 'Pounce - Domain Intelligence Platform',
      },
    ],
  },
  twitter: {
    card: 'summary_large_image',
    title: 'Pounce - Domain Intelligence for Investors',
    description: 'The market never sleeps. You should. Live domain intelligence.',
    images: [`${siteUrl}/og-image.png`],
  },
  alternates: {
    canonical: siteUrl,
  },
}

/**
 * Structured data for homepage
 */
export function getHomeStructuredData() {
  return [
    // Organization
    {
      '@context': 'https://schema.org',
      '@type': 'Organization',
      name: 'Pounce',
      url: siteUrl,
      logo: `${siteUrl}/pounce-logo.png`,
      description: 'Domain intelligence platform for investors and traders',
      foundingDate: '2024',
      sameAs: [
        'https://twitter.com/pouncedomains',
        'https://github.com/pounce',
      ],
      contactPoint: {
        '@type': 'ContactPoint',
        email: 'hello@pounce.ch',
        contactType: 'Customer Service',
        availableLanguage: ['en'],
      },
    },
    // WebSite with Search
    {
      '@context': 'https://schema.org',
      '@type': 'WebSite',
      name: 'Pounce',
      url: siteUrl,
      potentialAction: {
        '@type': 'SearchAction',
        target: {
          '@type': 'EntryPoint',
          urlTemplate: `${siteUrl}/search?q={search_term_string}`,
        },
        'query-input': 'required name=search_term_string',
      },
    },
    // SoftwareApplication
    {
      '@context': 'https://schema.org',
      '@type': 'SoftwareApplication',
      name: 'Pounce Domain Intelligence',
      applicationCategory: 'BusinessApplication',
      operatingSystem: 'Web Browser',
      offers: {
        '@type': 'AggregateOffer',
        lowPrice: '0',
        highPrice: '29',
        priceCurrency: 'USD',
        offerCount: '3',
      },
      featureList: [
        'Live domain monitoring',
        'Spam-filtered auction feed',
        'TLD price intelligence',
        'Portfolio management',
        'Price alerts',
        'Domain marketplace',
        'Health checks',
        'Sniper alerts',
      ],
    },
  ]
}

