import type Accessor from "../../core/Accessor.js";
import type { AttachmentCapabilities, CreateCapabilities, DeleteCapabilities, UpdateCapabilities } from "./types.js";
import type { EditorLayerUnion } from "../../widgets/Editor/types.js";

export interface EditingCapabilitiesProperties extends Partial<Pick<EditingCapabilities, "layer">> {}

/** The default editing capabilities for the provided layer. */
export default abstract class EditingCapabilities extends Accessor {
  /** The editing capabilities for attachments. */
  get attachments(): AttachmentCapabilities;
  /** The editing capabilities for creating features. */
  get create(): CreateCapabilities;
  /** The editing capabilities for deleting features. */
  get delete(): DeleteCapabilities;
  /** The associated layer. */
  accessor layer: EditorLayerUnion;
  /** Indicates when editing is enabled and is *only* due to administrative permissions. It returns `false` for *any* users if editing is generally enabled. */
  get reliesOnOwnerAdminPrivileges(): boolean;
  /** The editing capabilities for updating features. */
  get update(): UpdateCapabilities;
}