'use strict';
import { apiPathNames } from '../../../fd-toolbox/api/api-path-names.js';
import { resourceNames } from '../../../fd-toolbox/resources/resource-names.js';
import { apiGetWithOData, apiDelete } from '../../../fd-toolbox/api/api-client.js';
import { oDataComparisonTypes, oDataFilterTypes } from '../../../fd-toolbox/odata/odata-enums.js';
import { wellKnownUserProps } from '../../../fd-toolbox/constants/common-user-fields.js';

var __defProp=Object['defineProperty'],__name=(_0x2268f2,_0x1fcd4f)=>__defProp(_0x2268f2,'name',{'value':_0x1fcd4f,'configurable':!![]});async function loadData(_0x3856af,_0x1ae7e9){const _0x248c50=await apiGetWithOData(apiPathNames['user'],{'filters':[{'leftSide':wellKnownUserProps['isDisabled'],'rightSide':_0x1ae7e9,'type':oDataFilterTypes['default'],'comparisonType':oDataComparisonTypes['equal']}]});if(_0x248c50['data'])_0x3856af(_0x248c50['data']);}__name(loadData,'loadData');function getUserListHeaderText(){return resourceNames['user']+'s';}__name(getUserListHeaderText,'getUserListHeaderText');async function deleteUser(_0x590d29){await apiDelete(apiPathNames['otherUser'],_0x590d29);}__name(deleteUser,'deleteUser');async function onDeleteConfirmation(_0x335d2b,_0x264a1d,_0x45a75f,_0x5d1636){_0x335d2b&&(await deleteUser(_0x264a1d),_0x5d1636(_0x45a75f['filter'](_0x1dc1e8=>_0x1dc1e8['id']!==_0x264a1d)));}__name(onDeleteConfirmation,'onDeleteConfirmation');

export { deleteUser, getUserListHeaderText, loadData, onDeleteConfirmation };
