import { FilePicker } from "./Webamp" ; interface DropboxFile { link : string ; name : string ; } function genAudioFileUrlsFromDropbox ( ) { return new Promise ( ( resolve , reject ) => { if ( window . Dropbox == null ) { reject ( ) ; } window . Dropbox . choose ( { success : resolve , error : reject , linkType : "direct" , folderselect : false , multiselect : true , extensions : [ "video" , "audio" ] , } ) ; } ) ; } const dropboxFilePicker = { contextMenuName : "Dropbox..." , filePicker : async ( ) => { alert ( `Dropbox integration is currently disabled. See https://github.com/captbaritone/webamp/issues/750 for more information.` ) ; const files = await genAudioFileUrlsFromDropbox ( ) ; return files . map ( ( file ) => ( { url : file . link , defaultName : file . name , } ) ) ; } , requiresNetwork : true , } ; export default dropboxFilePicker ;