'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=(_0x35d5ff,_0x233f48)=>__defProp(_0x35d5ff,'name',{'value':_0x233f48,'configurable':!![]});async function onSelectedVisibleWorkspaceChange(_0x122bbb,_0x2fb8c3){_0x2fb8c3(_0x122bbb);const _0x53f3a0={'visibleWorkspaceIds':_0x122bbb};await apiPost(apiPathNames['visibleWorkspace'],_0x53f3a0);}__name(onSelectedVisibleWorkspaceChange,'onSelectedVisibleWorkspaceChange');async function initVisibleWorkspacePicker(_0x3cc4e4,_0x3bc792,_0x1b8587){if(_0x1b8587){_0x3cc4e4(_0x1b8587['visibleWorkspacesId']);const _0x30141d=prepareDisplayValuesMap(_0x1b8587['currentWorkspaceChildren']);_0x3bc792(_0x30141d);}}__name(initVisibleWorkspacePicker,'initVisibleWorkspacePicker');function prepareDisplayValuesMap(_0x584c50){if(!_0x584c50)return new Map();return _0x584c50['reduce']((_0x3bab95,_0x307855)=>{return _0x3bab95['set'](_0x307855['id'],_0x307855['name']),_0x3bab95;},new Map());}__name(prepareDisplayValuesMap,'prepareDisplayValuesMap');

export { initVisibleWorkspacePicker, onSelectedVisibleWorkspaceChange };
