import type { BiMultiMapHashed } from '../../../../bimultimap/custom/index.ts';import { HashMultiMapHashValue } from '../../../../multimap/mod.ts';import type { Streamable } from '../../../../stream/mod.ts';import { BiMultiMapBase, BiMultiMapContext } from '../../../../bimultimap/custom/index.ts';import type { HashSet } from '../../../../hashed/mod.ts';
export interface HashBiMultiMap<K, V> extends BiMultiMapBase<K, V, HashBiMultiMap.Types> {}
export namespace HashBiMultiMap { export interface NonEmpty<K, V> extends BiMultiMapBase.NonEmpty<K, V, HashBiMultiMap.Types>, Omit<HashBiMultiMap<K, V>, keyof BiMultiMapBase<any, any, any>>, Streamable.NonEmpty<[K, V]> {}
export interface Context<UK, UV> extends BiMultiMapBase.Context<UK, UV, HashBiMultiMap.Types> { readonly typeTag: 'HashBiMultiMap'; }
export interface Builder<K, V> extends BiMultiMapBase.Builder<K, V, HashBiMultiMap.Types> {}
export interface Types extends BiMultiMapBase.Types { readonly context: HashBiMultiMap.Context<this['_K'], this['_V']>; readonly normal: HashBiMultiMap<this['_K'], this['_V']>; readonly nonEmpty: HashBiMultiMap.NonEmpty<this['_K'], this['_V']>; readonly builder: HashBiMultiMap.Builder<this['_K'], this['_V']>; readonly keyValueMultiMap: HashMultiMapHashValue<this['_K'], this['_V']>; readonly valueKeyMultiMap: HashMultiMapHashValue<this['_V'], this['_K']>; readonly keyMultiMapValues: HashSet<this['_V']>; readonly valueMultiMapValues: HashSet<this['_K']>; }}
function createContext<UK, UV>(options?: { keyValueMultiMapContext?: HashMultiMapHashValue.Context<UK, UV>; valueKeyMultiMapContext?: HashMultiMapHashValue.Context<UV, UK>;}): HashBiMultiMap.Context<UK, UV> { return Object.freeze( new BiMultiMapContext<UK, UV, 'HashBiMultiMap', any>( 'HashBiMultiMap', options?.keyValueMultiMapContext ?? HashMultiMapHashValue.defaultContext(), options?.valueKeyMultiMapContext ?? HashMultiMapHashValue.defaultContext() ) );}
const _defaultContext: HashBiMultiMap.Context<any, any> = createContext();
export const HashBiMultiMap: BiMultiMapHashed.Creators = Object.freeze({ ..._defaultContext, createContext, defaultContext<UK, UV>(): HashBiMultiMap.Context<UK, UV> { return _defaultContext; },});