<script lang="ts">
	import * as mdi from '@mdi/js';

	let { name = '', size = 18 } = $props<{ name: string; size?: number }>();

	function getPath(iconName: string): string {
		return (mdi as any)[iconName] || '';
	}
</script>

{#if name && getPath(name)}
	<svg viewBox="0 0 24 24" width={size} height={size} fill="currentColor"><path d={getPath(name)} /></svg>
{/if}
