import { Schema } from "effect";
import { Locale } from "../../../../share/locale.js";
import { md } from "../../../../share/markdown.js";
export const type = "com.shwfed.operation.alert";
export const compatibilityDate = "2026-06-09";
export const metadata = {
  name: "\u786E\u8BA4\u5F39\u7A97",
  icon: "fluent:chat-warning-20-regular"
};
export function schema(_configure) {
  return Schema.Struct({
    message: Locale.annotations({
      title: "\u786E\u8BA4\u4FE1\u606F",
      description: "\u5F39\u7A97\u786E\u8BA4\u4FE1\u606F\uFF0C\u652F\u6301 `{{ expression }}` \u63D2\u503C"
    }),
    icon: Schema.optional(Schema.String.annotations({
      title: "\u56FE\u6807",
      description: "\u5F39\u7A97\u5185\u7684\u56FE\u6807"
    })),
    color: Schema.optional(Schema.String.annotations({
      title: "\u56FE\u6807\u989C\u8272",
      description: "\u5F39\u7A97\u5185\u56FE\u6807\u7684\u989C\u8272\uFF08\u4EFB\u610F CSS \u989C\u8272\u503C\uFF09"
    }))
  }).annotations({
    title: "AlertOperation",
    description: md`
      弹出确认弹窗。用户确认则继续执行后续操作；取消则中止本次触发链
      （与表单「校验」未通过同样的中止语义）。
    `
  });
}
export function defaults() {
  return {
    message: [{ locale: "zh", message: "" }]
  };
}
