'use strict';
import { metaNavigateToResourceList, navigateToResourceEdit } from '../services/meta-navigations.js';
import { silentChangeUrl } from '../../../fd-toolbox/routing/routers.js';
import { getODataParams } from '../../../fd-toolbox/odata/odata.js';
import { oDataOperators } from '../../../fd-toolbox/enums/enums.js';
import { metaQueryParams } from '../../../fd-toolbox/constants/meta-query-params.js';
import { routes } from '../../../fd-toolbox/routing/routes.js';
import { oDataComparisonTypes, oDataFilterTypes } from '../../../fd-toolbox/odata/odata-enums.js';
import { isUuidSet } from '../../../fd-toolbox/functions/value-checking-functions.js';
import { viewNames } from '../edit-resource/edit-resource-names.js';

var __defProp=Object['defineProperty'],__name=(_0x26fa7e,_0x20b492)=>__defProp(_0x26fa7e,'name',{'value':_0x20b492,'configurable':!![]});function navigateToResourceList(_0x534018,_0x298f23,_0x9e5833){let _0x231deb=_0x298f23['properties'][_0x534018['name']];if(_0x231deb&&_0x534018['relation']){let _0x42aba4={};if(_0x9e5833)_0x42aba4['filters']=[{'leftSide':_0x534018['relation']['relatedPropertyName'],'rightSide':[_0x9e5833],'type':oDataFilterTypes['guid'],'operator':oDataOperators['in'],'comparisonType':oDataComparisonTypes['equal']}];metaNavigateToResourceList(_0x534018['relation']['relatedResourceName'],_0x42aba4);}}__name(navigateToResourceList,'navigateToResourceList');function navigateToResource(_0x43bef6){navigateToResourceEdit(_0x43bef6);}__name(navigateToResource,'navigateToResource');function navigateToList(_0xb9dd0d,_0x5390ce,_0x42b5fa){navigateToResourceList(_0xb9dd0d,_0x5390ce,_0x42b5fa);}__name(navigateToList,'navigateToList');function resourceListOnFilterChange(_0x451269,_0x5b129e){let _0x427a0c=getODataParams({'filters':_0x451269});_0x427a0c['unshift']({'name':metaQueryParams['resource'],'value':_0x5b129e}),silentChangeUrl(routes['list'],_0x427a0c);}__name(resourceListOnFilterChange,'resourceListOnFilterChange');function isResourceListView(_0x1a5aeb,_0x16664d){const _0x121370=isUuidSet(_0x16664d);return !_0x121370&&_0x1a5aeb!==viewNames['editResource'];}__name(isResourceListView,'isResourceListView');

export { isResourceListView, navigateToList, navigateToResource, navigateToResourceList, resourceListOnFilterChange };
