'use strict';
import { isNullOrUndefined } from '../../../fd-toolbox/functions/value-checking-functions.js';
import { fetchUiResourceMeta } from '../ui-meta-providers.js';

var __defProp=Object['defineProperty'],__name=(_0x4b81d3,_0x6ad2d3)=>__defProp(_0x4b81d3,'name',{'value':_0x6ad2d3,'configurable':!![]});async function setBrowserSelectionPropertyResourceMeta(_0x12f77a,_0x309db7,_0x583dbb){const _0x5e1e30=await getBrowserSelectionResourceMetaIfNeeded(_0x12f77a,_0x583dbb);return _0x5e1e30&&_0x309db7(_0x5e1e30),_0x5e1e30;}__name(setBrowserSelectionPropertyResourceMeta,'setBrowserSelectionPropertyResourceMeta');async function getBrowserSelectionResourceMetaIfNeeded(_0x46027c,_0x2efd79){const _0x182f40=!isNullOrUndefined(_0x2efd79)&&_0x2efd79;if(_0x182f40)return Promise['resolve'](_0x2efd79);const _0x580623=await fetchUiResourceMeta(_0x46027c['relation']['relatedResourceName']);return _0x580623['resourceMeta'];}__name(getBrowserSelectionResourceMetaIfNeeded,'getBrowserSelectionResourceMetaIfNeeded');async function closeBrowserSelectionDialog(_0x27df1a,_0x16af19,_0x1ce028,_0x2a3cef,_0x916edb,_0xc22ce7,_0x2c3017){await setBrowserSelectionPropertyResourceMeta(_0x1ce028,_0x2a3cef,_0x916edb),_0x16af19(_0x27df1a);const _0x251bae=await getBrowserSelectionResourceMetaIfNeeded(_0x1ce028,_0x916edb);_0xc22ce7?.(_0x27df1a,_0x251bae);if(_0x27df1a['length']===0xc31*-0x1+0x35*0x9e+-0x1485)_0x2c3017?.();}__name(closeBrowserSelectionDialog,'closeBrowserSelectionDialog');function clearBrowserSelection(_0x2b89df,_0xd614d7,_0x1cb43e){_0x2b89df([]),_0xd614d7&&_0x1cb43e?.([],_0xd614d7);}__name(clearBrowserSelection,'clearBrowserSelection');

export { clearBrowserSelection, closeBrowserSelectionDialog, getBrowserSelectionResourceMetaIfNeeded, setBrowserSelectionPropertyResourceMeta };
