import type { Metadata } from "next";
import { getToolBySlug } from "@/tools/registry";
import { ToolLayout } from "@/components/tools/ToolLayout";
import { PercentCalculator } from "@/components/tools/PercentCalculator";

const tool = getToolBySlug("percent-calculator")!;

export const metadata: Metadata = {
  title: { absolute: tool.seoTitle },
  description: tool.seoDescription,
  keywords: tool.keywords,
  alternates: { canonical: `/tools/${tool.slug}` },
  openGraph: {
    title: tool.seoTitle,
    description: tool.seoDescription,
    url: `/tools/${tool.slug}`,
    type: "website",
  },
};

export default function PercentCalculatorPage() {
  return (
    <ToolLayout tool={tool}>
      <PercentCalculator />
    </ToolLayout>
  );
}
