import type Portal from "./Portal.js";
import type { JSONSupport } from "../core/JSONSupport.js";

export interface PortalFolderProperties extends Partial<Pick<PortalFolder, "id" | "portal" | "title">> {
  /** The date the folder was created. */
  created?: (Date | number | string) | null;
}

/**
 * Provides information about folders used to organize content in a portal.
 * Folders are only visible to the user and are used for organizing content
 * within the user's content space.
 *
 * @since 4.0
 * @see [Portal](https://developers.arcgis.com/javascript/latest/references/core/portal/Portal/)
 * @see [PortalUser](https://developers.arcgis.com/javascript/latest/references/core/portal/PortalUser/)
 * @see [ArcGIS Organization portals](https://developers.arcgis.com/javascript/latest/arcgis-organization-portals/)
 * @see [Rest API: Create Folder](https://developers.arcgis.com/rest/users-groups-and-items/create-folder.htm)
 * @see [Rest API: Delete Folder](https://developers.arcgis.com/rest/users-groups-and-items/delete-folder.htm)
 */
export default class PortalFolder extends JSONSupport {
  constructor(properties?: PortalFolderProperties);
  /** The date the folder was created. */
  get created(): Date | null | undefined;
  set created(value: (Date | number | string) | null | undefined);
  /** The unique id of the folder. */
  accessor id: string;
  /** The portal associated with the folder. */
  accessor portal: Portal | null | undefined;
  /** The title of the folder. */
  accessor title: string | null | undefined;
  /** The URL to the folder. */
  get url(): string | null | undefined;
}