/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{FileStatistics as t}from"./ParquetFileStatistics.js";import{createParquetFile as e}from"../../../../libs/parquet/parquet.js";class i{static async create(r,s,o,l,f){if(!f){const f=await e(o,{geometryInfo:r,provider:s}),n=t.fromFile(f);return new i(r,s,o,l,n,Promise.resolve(f))}return new i(r,s,o,l,f,null)}constructor(t,e,i,r,s,o){this._geometryInfo=t,this._provider=e,this.url=i,this.id=r,this.statistics=s,this._file=o}destroy(){null!=this._file&&this._file.then(t=>t.free())}get file(){return null==this._file&&(this._file=e(this.url,{geometryInfo:this._geometryInfo,provider:this._provider})),this._file}}export{i as ParquetFileInfo};
