export type TSearchListItemTag = { text?: string, color?: string, icon?: string };
export type TSearchListItemBadge = { text?: string, color?: string, icon?: string };


export type TSearchListItem = { number_of_results?: number, fixed?: boolean, text: string; url?: string; id: string; icon?: string; tags?: TSearchListItemTag[]; badge?: TSearchListItemBadge };

export type Component = {
	id?: string;
	style?: string;

	value: string;

	// server_uri: string;
	// method: "GET" | "POST";

	// resultitemtitlekey: string;
	// resultitemlinkkey: string;
	disable_preview?: "yes" | "no" | "true" | "false" | "on" | "off";
	searchlabel?: string;
	minlength?: number;
	searchlist?: TSearchListItem[];
	input_info?: TSearchListItem
	textarea?: "yes" | "true" | ""
	disabled?: "yes" | "no"
};

export type Events = {
	search: {
		input: string;
		by: "button" | "input" | "searchlist";
		item?: TSearchListItem;
	};
	clear: { id: string };
};
