import { Schema } from "@griddo/core";

const schema: Schema.Module = {
	schemaType: "module",
	component: "{{NAME}}",
	displayName: "{{DISPLAY_NAME}}",

	configTabs: [
		{
			title: "content",
			fields: [
				{
					type: "HeadingField",
					title: "Title",
					default: { content: "Lorem ipsum", tag: "h2" },
					key: "title",
					placeholder: "Type your title",
					advanced: true,
					helptext: "Write plain text and select the heading type",
					hideable: true,
					isMockup: false,
					mandatory: true,
					options: [
						{ label: "h1", value: "h1" },
						{ label: "h2", value: "h2" },
						{ label: "h3", value: "h3" },
					],
				},
			],
		},

		{
			title: "config",
			fields: [
				{
					title: "Anchor ID",
					type: "TextField",
					key: "anchorID",
					prefix: "#",
					hideable: true,
					helptext:
						"Do not use uppercase letter or spaces and cannot start with numbers. Example: this-is-an-anchor.",
				},
			],
		},
	],

	default: {
		component: "{{NAME}}",
		title: { content: "Lorem ipsum", tag: "h2" },
		anchorID: "",
	},

	thumbnails: {
		"1x": "/thumbnails/modules/{{NAME}}/thumbnail@1x.png",
		"2x": "/thumbnails/modules/{{NAME}}/thumbnail@2x.png",
	},
};

export default schema;
