'use strict';
import { metaQueryParams } from '../../../fd-toolbox/constants/meta-query-params.js';
import { routes } from '../../../fd-toolbox/routing/routes.js';
import { getODataParams } from '../../../fd-toolbox/odata/odata.js';
import { navigate } from '../../../fd-toolbox/redirect/redirect-functions.js';
import { addQueryParamsToPath } from '../../../fd-toolbox/routing/paths.js';

var __defProp=Object['defineProperty'],__name=(_0x1a057f,_0x3fb427)=>__defProp(_0x1a057f,'name',{'value':_0x3fb427,'configurable':!![]});function getResourceUrl(_0x24d0c5,_0x53300d,_0x20c884,_0x33ea56=[],_0x32bbd1,_0x13ca23){const _0x5cfad4=[{'name':metaQueryParams['resource'],'value':_0x53300d}];return _0x20c884&&_0x5cfad4['push']({'name':metaQueryParams['id'],'value':_0x20c884}),_0x32bbd1&&_0x5cfad4['push']({'name':metaQueryParams['viewName'],'value':_0x32bbd1}),_0x13ca23&&_0x5cfad4['push']({'name':metaQueryParams['default'],'value':_0x13ca23}),_0x5cfad4['push'](..._0x33ea56),addQueryParamsToPath(_0x24d0c5,_0x5cfad4);}__name(getResourceUrl,'getResourceUrl');function getResourceViewUrl(_0x4193c7,_0x39898e,_0x7f68ef,_0x2a1ad8=[],_0x1146ca){return getResourceUrl(routes['view'],_0x4193c7,_0x39898e,_0x2a1ad8,_0x7f68ef,_0x1146ca);}__name(getResourceViewUrl,'getResourceViewUrl');function getResourceEditUrl(_0xf8d177,_0x4bc3eb,_0x35ff2e=[]){return getResourceUrl(routes['edit'],_0xf8d177,_0x4bc3eb,_0x35ff2e);}__name(getResourceEditUrl,'getResourceEditUrl');function getResourceListUrl(_0x4a267b,_0x47fb4f){const _0x1a86a0=[{'name':metaQueryParams['resource'],'value':_0x4a267b}];if(_0x47fb4f){const _0x4d391f=getODataParams(_0x47fb4f);_0x1a86a0['push'](..._0x4d391f);}return addQueryParamsToPath(routes['list'],_0x1a86a0);}__name(getResourceListUrl,'getResourceListUrl');function navigateToResourceEdit(_0x27c433,_0x429d47,_0x2b9969=[]){navigate(getResourceUrl(routes['edit'],_0x27c433,_0x429d47,_0x2b9969));}__name(navigateToResourceEdit,'navigateToResourceEdit');function metaNavigateToResourceList(_0x11e49c,_0x2865cc){navigate(getResourceListUrl(_0x11e49c,_0x2865cc));}__name(metaNavigateToResourceList,'metaNavigateToResourceList');function getRelativeResourceUrl(_0xcad6b,_0x1e831a,_0x3b38ec,_0x1d9b71=[],_0x370da7,_0x45c85b){return '/'+getResourceUrl(_0xcad6b,_0x1e831a,_0x3b38ec,_0x1d9b71,_0x370da7,_0x45c85b);}__name(getRelativeResourceUrl,'getRelativeResourceUrl');

export { getRelativeResourceUrl, getResourceEditUrl, getResourceListUrl, getResourceUrl, getResourceViewUrl, metaNavigateToResourceList, navigateToResourceEdit };
