import type Accessor from "../../core/Accessor.js";
import type ModelFileInfo from "./ModelFileInfo.js";

/**
 * Metadata about a source or derived model associated with a 3D object feature.
 *
 * Use this class to inspect model names, formats, sizes, and files before downloading file content.
 *
 * @since 5.1
 */
export default abstract class ModelInfo extends Accessor {
  /**
   * Files that make up this model. A model can consist of multiple files, such as a glTF entry file and texture
   * files.
   */
  get files(): ModelFileInfo[];
  /**
   * Format of the model. For a given feature, the source model can use a different format than derived models returned
   * for the same feature. Known possible formats include `dae`, `dwg`, `fbx`, `glb`, `glt`, `ifc`, `obj`,
   * `shapebuffer`, `shapebufferg`, `usd`, `usda`, `usdc` and `usdz`. Supported request formats are listed in
   * `capabilities.data.queryFormats` on the layer's [capabilities](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/#capabilities).
   *
   * @default ""
   */
  get format(): string;
  /**
   * Indicates whether this model is the source model of the feature for which it was queried rather than a derived
   * representation.
   *
   * @default false
   */
  get isSource(): boolean;
  /**
   * Entry point file name of the model. For example, if the model is a glTF with a number of texture files, then the
   * model name will be the file name of the `.gltf` file in the [files](https://developers.arcgis.com/javascript/latest/references/core/layers/scene/ModelInfo/#files) array. Source
   * and derived models of the same feature can have different names.
   *
   * @default ""
   */
  get name(): string;
  /**
   * Combined size of all files in the model, in bytes.
   *
   * @default 0
   */
  get size(): number;
}