/** * External dependencies */ import type { EntityId, EntityInstance, EntityKind, EntityKindName, Maybe, } from '@nab/types'; /** * Internal dependencies */ import type { State } from '../types'; export function getKindEntities( state: State ): ReadonlyArray< EntityKind > { return state.entities.config; } export function getEntityRecord( state: State, kind: EntityKindName, key: EntityId ): Maybe< EntityInstance > { return state.entities.data[ kind ]?.[ key ]; }