import { Schema } from "effect";
import { LocaleMarkdown } from "../../../../../share/expression.js";
import { commonFieldFields } from "../../../utils/common.js";
export const type = "com.shwfed.form.field.markdown";
export const compatibilityDate = "2026-04-22";
export const metadata = {
  name: "Markdown",
  icon: "fluent:markdown-20-regular",
  w: { initial: 8, min: 2, max: Infinity },
  h: { initial: 2, min: 2, max: Infinity, grow: true }
};
export function schema(configure) {
  return Schema.Struct({
    type: Schema.Literal(type),
    compatibilityDate: Schema.Literal(compatibilityDate),
    ...commonFieldFields(configure),
    content: LocaleMarkdown({ configure }).annotations({
      title: "\u5185\u5BB9",
      description: "\u6E32\u67D3\u4E3A Markdown \u7684\u591A\u8BED\u8A00\u6587\u672C\uFF0C\u652F\u6301 `{{ \u8868\u8FBE\u5F0F }}` \u63D2\u503C"
    })
  }).annotations({
    title: "MarkdownField",
    description: "\u6E32\u67D3\u4E00\u6BB5 Markdown \u6587\u672C\uFF08\u4EC5\u5C55\u793A\uFF0C\u4E0D\u53C2\u4E0E\u8868\u5355\u63D0\u4EA4\uFF09"
  });
}
