'use strict';
import { v5, v7, validate } from 'uuid';
import { createError } from './errors/errors.js';
import { emptyUuid } from './constants/constants.js';

var __defProp=Object['defineProperty'],__name=(_0x1c3d06,_0x40ab23)=>__defProp(_0x1c3d06,'name',{'value':_0x40ab23,'configurable':!![]});const uuidVersions={'v5':0x5,'v7':0x7};function getEmptyUuid(){return emptyUuid;}__name(getEmptyUuid,'getEmptyUuid');function getNewUuid(_0x141b1c=uuidVersions['v7'],_0x4e1e91,_0x4044af){if(_0x141b1c===uuidVersions['v5']){if(!_0x4e1e91||!_0x4044af)throw createError('The\x20input\x20string\x20cannot\x20be\x20null\x20or\x20empty.');return v5(_0x4044af,_0x4e1e91);}else {if(_0x141b1c===uuidVersions['v7'])return v7();else throw createError('Invalid\x20UUID\x20version.\x20Only\x20versions\x205\x20and\x207\x20are\x20supported.');}}__name(getNewUuid,'getNewUuid');function isNonEmptyUuid(_0x548317){return !(_0x548317===''||_0x548317===emptyUuid);}__name(isNonEmptyUuid,'isNonEmptyUuid');function isValidUuid(_0x3b4c2c){try{return validate(_0x3b4c2c),!![];}catch{return ![];}}__name(isValidUuid,'isValidUuid');

export { getEmptyUuid, getNewUuid, isNonEmptyUuid, isValidUuid, uuidVersions };
