import { TempstreamJSX } from "tempstream";
import type { ComponentToHTMLArgs } from "@sealcode/jdd";
import { Component, ComponentArguments } from "@sealcode/jdd";

const component_arguments = {
	id: new ComponentArguments.ShortText(),
} as const;

export class Anchor extends Component<typeof component_arguments> {
	getArguments() {
		return component_arguments;
	}

	async toHTML({
		args: { id },
		classes,
	}: ComponentToHTMLArgs<typeof component_arguments>): Promise<string> {
		return <div id={id} class={["anchor", "jdd-no-gap", ...classes]}></div>;
	}
}
