import { RecordFactory } from "../R/RecordFactory"; import { ClipboardR, RecordNode } from "../R/RecordNode"; import { RT } from "../R/RecordTypes"; export declare class SceneFactory extends RecordFactory { constructor(json: RecordNode); /** Overriding add rule: Sub record ids should be made unique after duplications - this helps keeping all ids in the tree unique */ addRecord(this: SceneFactory, record: RecordNode, position?: number): RecordNode | undefined; /** * adds record into the group if groupElementId is present * else adds record to the scene */ addDeepRecord(this: SceneFactory, { record, position, groupElementId }: { record: RecordNode; position?: number; groupElementId?: number; }): RecordNode | undefined; /** Overriding duplicate rule: Sub record ids should be made unique after duplications - this helps keeping all ids in the tree unique */ duplicateRecord(this: SceneFactory, type: N, id: number): RecordNode | undefined; /** * Overriding duplicate rule: Sub record ids should be made unique after duplications - this helps keeping all ids in the tree unique */ duplicateDeepRecord(type: N, id: number): RecordNode | undefined; /** Overriding delete element: Deleting an element/variable (any CogObject) should also delete its rules */ deleteRecord(this: SceneFactory, type: N, id: number): RecordNode | undefined; /** Overriding delete deep element: Deleting an element/variable (any CogObject) should also delete its rules */ deleteDeepRecord(this: SceneFactory, type: N, id: number): RecordNode | undefined; /** * Deleting an element/variable (any CogObject) should also delete its rules */ deleteRulesForCoId(this: SceneFactory, id: number): void; /** * Makes sure all event ids and action ids don't clash with any of the event/actions ids in the current scene * This is useful when a rule is duplicated - we need to change the event_id's and action_id's of * all the WhenEvents and ThenActions inside the rule to unique ones. */ dedupeWeTaIds(this: SceneFactory, rule: RecordNode): void; /** * Makes sure that all elements in a single scene have unique ids. This function ensures that whenever a group is duplicated (at any depth), * new ids are generated for all it's children * @param group */ dedupeGroupElements(this: SceneFactory, group: RecordNode): void; /** * ISSUE : We were facing issue when we copy element from root to group, id for that element was duplicated and that was causing an issue. Below id fix for that * this function will add record with new element id to prevent duplicate issue. */ pasteFromClipboardObject(this: SceneFactory, { obj, position, groupElementId }: { obj: ClipboardR; position?: number; groupElementId?: number; }): (RecordNode | undefined)[]; }