import type { AstroExpressiveCodeOptions } from "astro-expressive-code";
import type { SiteConfig } from "@/types";

export const siteConfig: SiteConfig = {
	// ! Please remember to replace the following site property with your own domain, used in astro.config.ts
	url: "https://prad.nu/",
	title: "Prad Nukala",
	author: "Prad Nukala",
	description: "Engineer & founder. Projects, experience, writing and talks.",
	lang: "en-US",
	ogLocale: "en_US",
	// Date.prototype.toLocaleDateString() parameters, found in src/utils/date.ts.
	date: {
		locale: "en-GB",
		options: {
			day: "numeric",
			month: "short",
			year: "numeric",
		},
	},
};

// Origin that serves Cloudflare Stream embeds. Set to your Worker/custom domain
// or the account's `customer-<CODE>.cloudflarestream.com` subdomain.
// The Stream player iframe is loaded from `${streamOrigin}/<videoId>/iframe`.
export const streamOrigin = "https://customer-CODE.cloudflarestream.com";

// Social links shown in the homepage intro and the footer's icon row.
export const socialLinks: {
	friendlyName: string;
	link: string;
	name: string;
	isWebmention?: boolean;
}[] = [
	{ friendlyName: "GitHub", link: "https://github.com/prdlk", name: "mdi:github" },
	{ friendlyName: "X", link: "https://x.com/basedprad", name: "mdi:twitter" },
	{ friendlyName: "LinkedIn", link: "https://linkedin.com/in/pradn", name: "mdi:linkedin" },
	{ friendlyName: "Email", link: "mailto:prnk28@gmail.com", name: "mdi:email-outline" },
];

// Used to generate links in both the Header & Footer.
export const menuLinks: { path: string; title: string }[] = [
	{
		path: "/",
		title: "Home",
	},
	{
		path: "/projects/",
		title: "Projects",
	},
	{
		path: "/experience/",
		title: "Experience",
	},
	{
		path: "/writing/",
		title: "Writing",
	},
	{
		path: "/speaking/",
		title: "Speaking",
	},
	{
		path: "/about/",
		title: "About",
	},
];

// https://expressive-code.com/reference/configuration/
export const expressiveCodeOptions: AstroExpressiveCodeOptions = {
	styleOverrides: {
		borderRadius: "4px",
		codeFontFamily:
			'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
		codeFontSize: "0.875rem",
		codeLineHeight: "1.7142857rem",
		codePaddingInline: "1rem",
		frames: {
			frameBoxShadowCssValue: "none",
		},
		uiLineHeight: "inherit",
	},
	themeCssSelector(theme, { styleVariants }) {
		// If one dark and one light theme are available
		// generate theme CSS selectors compatible with cactus-theme dark mode switch
		if (styleVariants.length >= 2) {
			const baseTheme = styleVariants[0]?.theme;
			const altTheme = styleVariants.find((v) => v.theme.type !== baseTheme?.type)?.theme;
			if (theme === baseTheme || theme === altTheme) return `[data-theme='${theme.type}']`;
		}
		// return default selector
		return `[data-theme="${theme.name}"]`;
	},
	// One dark, one light theme => https://expressive-code.com/guides/themes/#available-themes
	themes: ["dracula", "github-light"],
	useThemedScrollbars: false,
};
