"use client";

import Head from "next/head";

type SeoMetaProps = {
  lang: "es" | "en";
};

export default function SeoMeta({ lang }: SeoMetaProps) {
  const isEs = lang === "es";
  const title = isEs
    ? "SiteMente | Implementación de IA Málaga - Chatbots para Restaurantes, Inmobiliarias, Rent a Car"
    : "SiteMente | AI Implementation Málaga - Chatbots for Restaurants, Real Estate, Car Rentals";
  const description = isEs
    ? "Agencia de IA en Málaga. Chatbots y automatización para restaurantes, inmobiliarias y alquiler de coches desde €299/mes. Soporte bilingüe ES/EN. +120 clientes en Costa del Sol."
    : "AI agency in Málaga. Chatbots and automation for restaurants, real estate and car rentals from €299/month. Bilingual support ES/EN. +120 clients in Costa del Sol.";
  const keywords = isEs
    ? "implementación IA España, chatbot restaurantes Málaga, IA inmobiliarias Costa del Sol, automatización negocios Marbella, agencia IA España"
    : "AI implementation Spain, restaurant chatbot Málaga, real estate AI Costa del Sol, business automation Marbella";
  const url = isEs ? "https://sitemente.com" : "https://sitemente.com/en";
  const locale = isEs ? "es_ES" : "en_US";

  return (
    <Head>
      <title>{title}</title>
      <meta name="description" content={description} />
      <meta name="keywords" content={keywords} />
      <meta name="robots" content="index, follow" />
      <meta
        name="googlebot"
        content="index, follow, max-image-preview:large"
      />
      <link rel="canonical" href={url} />

      <meta property="og:title" content={title} />
      <meta property="og:description" content={description} />
      <meta property="og:url" content={url} />
      <meta property="og:image" content="https://sitemente.com/og-banner.jpg" />
      <meta property="og:image:width" content="1200" />
      <meta property="og:image:height" content="630" />
      <meta property="og:locale" content={locale} />
      <meta property="og:type" content="website" />
      <meta property="og:site_name" content="SiteMente" />

      <meta name="twitter:card" content="summary_large_image" />
      <meta name="twitter:title" content={title} />
      <meta name="twitter:description" content={description} />
      <meta
        name="twitter:image"
        content="https://sitemente.com/og-banner.jpg"
      />
    </Head>
  );
}
