import { Schema } from "effect";
import { TableConfig, defaultTableConfig } from "../../../../table/schema.js";
export const type = "com.shwfed.block.table";
export const compatibilityDate = "2026-05-06";
export const metadata = {
  name: "\u8868\u683C",
  icon: "fluent:table-20-regular",
  w: { initial: 32, min: 12, max: Infinity },
  h: { initial: 8, min: 3, max: Infinity }
};
export function schema(configure, _blockRef) {
  const TableSchema = TableConfig(configure);
  return Schema.Struct({
    id: Schema.UUID.annotations({ description: "\u5757\u552F\u4E00\u6807\u8BC6" }),
    type: Schema.tag(type),
    compatibilityDate: Schema.tag(compatibilityDate),
    table: TableSchema.annotations({
      title: "\u8868\u683C\u914D\u7F6E",
      description: "\u5185\u5D4C\u7684 Table \u7EC4\u4EF6\u914D\u7F6E"
    })
  }).annotations({
    title: "\u8868\u683C\u5757",
    description: "\u5C06\u4E00\u4E2A Table \u7EC4\u4EF6\u4F5C\u4E3A\u9875\u9762\u5757\u5D4C\u5165"
  });
}
export function defaultBody() {
  return { table: defaultTableConfig() };
}
