'use strict';
import { resourceNames } from '../../../fd-toolbox/resources/resource-names.js';
import { getResources } from '../../meta/server/services/resource-provider.js';
import { storeProps } from '../../common/stores/store-props.js';
import { getODataFilter } from '../../../fd-toolbox/odata/odata-builder-funcs.js';
import { oDataComparisonTypes } from '../../../fd-toolbox/odata/odata-enums.js';
import { getUserHomeWorkspaceId } from '../users/user-db.js';
import { createResource } from '../../meta/server/resources/crud-resources.js';
import { singleOrUndefined } from '../../../fd-toolbox/server/collections/single-funcs.js';

var __defProp=Object['defineProperty'],__name=(_0x4e19e4,_0x3cbe74)=>__defProp(_0x4e19e4,'name',{'value':_0x3cbe74,'configurable':!![]});function createStore(_0x4ab866){return createResource(_0x4ab866,resourceNames['store']);}__name(createStore,'createStore');async function getStoreByUserId(_0x599c85){const _0x44940c=await getUserHomeWorkspaceId(_0x599c85),_0x293e43=getODataFilter(storeProps['workspaceId'],_0x44940c,{'comparisonType':oDataComparisonTypes['equal']})['expandMany']([])['selectMany']({})['build'](),_0x599b3c=await getResources(resourceNames['store'],_0x599c85,_0x293e43);return singleOrUndefined(_0x599b3c);}__name(getStoreByUserId,'getStoreByUserId');

export { createStore, getStoreByUserId };
