'use strict';

var ethers = require('ethers');
var zod = require('zod');
var index = require('./index-23d51a41.cjs.dev.js');

const RawDateSchema = /* @__PURE__ */(() => zod.z.union([zod.z.date().transform(i => {
  return ethers.BigNumber.from(Math.floor(i.getTime() / 1000));
}), zod.z.number().transform(i => {
  return ethers.BigNumber.from(i);
})]))();

/**
 * Default to now
 */
const StartDateSchema = /* @__PURE__ */(() => RawDateSchema.default(new Date(0)))();

/**
 * Default to 10 years from now
 */
const EndDateSchema = /* @__PURE__ */(() => RawDateSchema.default(new Date(Date.now() + 1000 * 60 * 60 * 24 * 365 * 10)))();

/**
 * Checks whether the given DetectableFeature is defined
 * @internal
 * @param namespace - The namespace to check
 * @param feature - The corresponding feature
 */
function assertEnabled(namespace, feature) {
  if (!namespace) {
    throw new index.ExtensionNotImplementedError(feature);
  }
  return namespace;
}

exports.EndDateSchema = EndDateSchema;
exports.RawDateSchema = RawDateSchema;
exports.StartDateSchema = StartDateSchema;
exports.assertEnabled = assertEnabled;
