/**
 * Inline icons used by the app menu. They are kept here instead of using an
 * icon package so the menu has no runtime dependencies beyond React — it is
 * rendered on every page in the portal.
 */

type IconProps = {
	size?: number;
};

export function StarIcon({ filled = false, size = 16 }: IconProps & { filled?: boolean }) {
	return (
		<svg
			xmlns="http://www.w3.org/2000/svg"
			viewBox="0 0 24 24"
			fill={filled ? "currentColor" : "none"}
			stroke="currentColor"
			strokeWidth="1.5"
			strokeLinejoin="round"
			aria-hidden="true"
			focusable="false"
			width={size}
			height={size}
		>
			<path d="M12 3.25l2.72 5.51 6.08.89-4.4 4.29 1.04 6.06L12 17.14l-5.44 2.86 1.04-6.06-4.4-4.29 6.08-.89z" />
		</svg>
	);
}

export function HomeIcon({ size = 18 }: IconProps) {
	return (
		<svg
			xmlns="http://www.w3.org/2000/svg"
			viewBox="0 0 24 24"
			fill="currentColor"
			aria-hidden="true"
			focusable="false"
			width={size}
			height={size}
		>
			<path d="M11.36 3.2a1 1 0 0 1 1.28 0l7.5 6.25a.75.75 0 0 1-.96 1.15L19 10.4V19a2 2 0 0 1-2 2h-2.75a.75.75 0 0 1-.75-.75V15.5h-3v4.75a.75.75 0 0 1-.75.75H7a2 2 0 0 1-2-2v-8.6l-.18.2a.75.75 0 1 1-.96-1.15zM6.5 9.15V19a.5.5 0 0 0 .5.5h2v-4.75a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 .75.75v4.75h2a.5.5 0 0 0 .5-.5V9.15L12 4.73z" />
		</svg>
	);
}

export function ReloadIcon({ size = 18 }: IconProps) {
	return (
		<svg
			xmlns="http://www.w3.org/2000/svg"
			viewBox="0 0 24 24"
			fill="currentColor"
			aria-hidden="true"
			focusable="false"
			width={size}
			height={size}
		>
			<path d="M12 4a8 8 0 0 1 7.5 5.2.75.75 0 1 1-1.4.5A6.5 6.5 0 0 0 6.2 9.25H8.5a.75.75 0 0 1 0 1.5H4.75A.75.75 0 0 1 4 10V6.25a.75.75 0 0 1 1.5 0v1.86A8 8 0 0 1 12 4m-7.6 9.55a.75.75 0 0 1 .95.45A6.5 6.5 0 0 0 17.8 14.75H15.5a.75.75 0 0 1 0-1.5h3.75a.75.75 0 0 1 .75.75V17.75a.75.75 0 0 1-1.5 0v-1.86A8 8 0 0 1 4.5 14.5a.75.75 0 0 1 .45-.95z" />
		</svg>
	);
}

export function CloseIcon({ size = 20 }: IconProps) {
	return (
		<svg
			xmlns="http://www.w3.org/2000/svg"
			viewBox="0 0 24 24"
			fill="currentColor"
			aria-hidden="true"
			focusable="false"
			width={size}
			height={size}
		>
			<path d="M6.53 5.47a.75.75 0 0 0-1.06 1.06L10.94 12l-5.47 5.47a.75.75 0 1 0 1.06 1.06L12 13.06l5.47 5.47a.75.75 0 1 0 1.06-1.06L13.06 12l5.47-5.47a.75.75 0 0 0-1.06-1.06L12 10.94z" />
		</svg>
	);
}
