export default async function openFileSelect(options) {
  return new Promise((resolve, reject) => {
    try {
      const fileInputEl = document.createElement("input");
      fileInputEl.type = "file";
      if (options === null || options === void 0 ? void 0 : options.multiple) {
        fileInputEl.multiple = true;
      }
      fileInputEl.onchange = (e) => {
        resolve(e.target.files);
      };
      fileInputEl.click();
    }
    catch (e) {
      reject(e);
    }
  });
}
