'use strict';
import { apiPost } from '../../../../fd-toolbox/api/api-client.js';
import { apiPathNames } from '../../../../fd-toolbox/api/api-path-names.js';

var __defProp=Object['defineProperty'],__name=(_0xcba38d,_0x367eab)=>__defProp(_0xcba38d,'name',{'value':_0x367eab,'configurable':!![]});async function initWorkspacePicker(_0x44a6f9,_0x15e81e,_0x1886fe,_0x485a52){_0x15e81e(_0x485a52['homeWorkspace']),_0x44a6f9(_0x485a52['childWorkspaces']),_0x485a52['currentWorkspaceId']&&_0x1886fe(_0x485a52['currentWorkspaceId']);}__name(initWorkspacePicker,'initWorkspacePicker');async function onSelectedWorkspaceChange(_0x27d247,_0x516850){if(!_0x27d247)return;if(_0x27d247===_0x516850)return;const _0x375039={'workspaceId':_0x27d247};await apiPost(apiPathNames['changeWorkspace'],_0x375039),location['reload']();}__name(onSelectedWorkspaceChange,'onSelectedWorkspaceChange');function getWorkspacePickerSelectTriggerId(_0x2ef875){return _0x2ef875+'userDropdownButtonuserDropdownButtonWorkspacePickerSelectTrigger';}__name(getWorkspacePickerSelectTriggerId,'getWorkspacePickerSelectTriggerId');function getWorkspacePickerSelectItemId(_0x2025ed,_0x1e4264){return _0x2025ed+'userDropdownButtonuserDropdownButtonWorkspacePicker_'+_0x1e4264+'_SelectItem';}__name(getWorkspacePickerSelectItemId,'getWorkspacePickerSelectItemId');

export { getWorkspacePickerSelectItemId, getWorkspacePickerSelectTriggerId, initWorkspacePicker, onSelectedWorkspaceChange };
