export interface HobbyDefinition {
	id: string;
	name: string;
	icon: string; // Lucide icon name from iconData
	descriptor: string; // Short tagline shown on card
	tags: string[]; // Catalog tags to query for this hobby
}

export const HOBBIES: HobbyDefinition[] = [
	{
		id: "bikepacking",
		name: "Bikepacking",
		icon: "bike",
		descriptor: "Ride & camp",
		tags: ["bikepacking", "cycling", "camping"],
	},
	{
		id: "hiking",
		name: "Hiking",
		icon: "mountain",
		descriptor: "Trail gear",
		tags: ["hiking", "backpacking", "camping"],
	},
	{
		id: "climbing",
		name: "Climbing",
		icon: "mountain-snow",
		descriptor: "Vertical kit",
		tags: ["climbing", "mountaineering"],
	},
	{
		id: "cycling",
		name: "Cycling",
		icon: "circle-dot",
		descriptor: "Road & gravel",
		tags: ["cycling", "road-cycling", "gravel"],
	},
	{
		id: "camping",
		name: "Camping",
		icon: "tent",
		descriptor: "Base camp",
		tags: ["camping", "backpacking"],
	},
	{
		id: "running",
		name: "Running",
		icon: "footprints",
		descriptor: "Run light",
		tags: ["running", "trail-running"],
	},
];

/** Deduplicate and collect all tags for the given hobby IDs */
export function getTagsForHobbies(hobbyIds: string[]): string[] {
	const tagSet = new Set<string>();
	for (const id of hobbyIds) {
		const hobby = HOBBIES.find((h) => h.id === id);
		if (hobby) {
			for (const t of hobby.tags) {
				tagSet.add(t);
			}
		}
	}
	return [...tagSet];
}
