import * as Schema from 'effect/Schema';
import { Field } from '../entity/entity.js';
// biome-ignore lint/suspicious/noShadowRestrictedNames: is part of a namespaces module and therefor ok
export const String = Schema.String;
// biome-ignore lint/suspicious/noShadowRestrictedNames: is part of a namespaces module and therefor ok
export const Number = Schema.Number;
// biome-ignore lint/suspicious/noShadowRestrictedNames: is part of a namespaces module and therefor ok
export const Boolean = Schema.Boolean;
// biome-ignore lint/suspicious/noShadowRestrictedNames: is part of a namespaces module and therefor ok
export const Date = Schema.Date;
export const Point = /*#__PURE__*/Schema.transform(Schema.String, /*#__PURE__*/Schema.Array(Number), {
  strict: true,
  decode: str => {
    return str.split(',').map(n => globalThis.Number(n));
  },
  encode: points => points.join(',')
});
export const optional = Schema.optional;
export const Relation = schema => {
  const relationSchema = Field({
    select: Schema.Array(schema),
    insert: Schema.optional(Schema.Array(Schema.String)),
    update: Schema.Undefined
  });
  return relationSchema;
};
//# sourceMappingURL=type.js.map