import { p as pipe, g as getOrElse, c as isSome, b as fromNullable } from './index-6869168f.js';

function assertSome(value) {
  const option = fromNullable(value);
  if (isSome(option)) {
    return option;
  }
  throw new Error('Expected value');
}
function getOrDefault(option, value) {
  return pipe(option, getOrElse(() => value));
}
function getOrError(option, error = 'Option value is none.') {
  return pipe(option, getOrElse(() => {
    throw new Error(error);
  }));
}
function toSelectInputOptionsArray(list) {
  return list.map((s) => ({ label: String(s), value: s }));
}

export { getOrError as a, assertSome as b, getOrDefault as g, toSelectInputOptionsArray as t };
