import React from 'react';
import { ProjectModel } from '@bryntum/calendar';
import { createWidget, shouldComponentUpdate, processWidgetContent } from './WrapperHelper.js';
export class BryntumCalendarProjectModel extends React.Component {
    constructor() {
        super(...arguments);
        this.processWidgetContent = processWidgetContent;
        this.dataStores = {
            'assignmentStore': 'assignments',
            'dependencyStore': 'dependencies',
            'eventStore': 'events',
            'resourceStore': 'resources',
            'resourceTimeRangeStore': 'resourceTimeRanges',
            'timeRangeStore': 'timeRanges'
        };
    }
    componentDidMount() {
        this.instance = createWidget(this);
    }
    componentWillUnmount() {
        var _a, _b;
        (_b = (_a = this.instance) === null || _a === void 0 ? void 0 : _a.destroy) === null || _b === void 0 ? void 0 : _b.call(_a);
    }
    shouldComponentUpdate(nextProps, nextState) {
        return shouldComponentUpdate(this, nextProps, nextState);
    }
    render() {
        return null;
    }
}
BryntumCalendarProjectModel.instanceClass = ProjectModel;
BryntumCalendarProjectModel.instanceName = 'ProjectModel';
BryntumCalendarProjectModel.configNames = [
    'adjustDurationToDST',
    'assignmentModelClass',
    'assignmentsData',
    'assignmentStoreClass',
    'children',
    'dependenciesData',
    'dependencyModelClass',
    'dependencyStoreClass',
    'eventModelClass',
    'eventsData',
    'eventStoreClass',
    'expanded',
    'orderedParentIndex',
    'parentIndex',
    'resourceModelClass',
    'resourcesData',
    'resourceStoreClass',
    'resourceTimeRangesData',
    'resourceTimeRangeStoreClass',
    'silenceInitialCommit',
    'timeRangeModelClass',
    'timeRangesData',
    'timeRangeStoreClass',
    'toJSONResultFormat',
    'useRawData'
];
BryntumCalendarProjectModel.propertyConfigNames = [
    'assignments',
    'assignmentStore',
    'dependencies',
    'dependencyStore',
    'events',
    'eventStore',
    'id',
    'includeLegacyDataProperties',
    'isFullyLoaded',
    'json',
    'onChange',
    'onDataReady',
    'parentId',
    'readOnly',
    'remoteChildCount',
    'resources',
    'resourceStore',
    'resourceTimeRanges',
    'resourceTimeRangeStore',
    'shouldSyncDataOnLoad',
    'stm',
    'timeRanges',
    'timeRangeStore',
    'timeZone'
];
BryntumCalendarProjectModel.propertyNames = [
    'allChildren',
    'allUnfilteredChildren',
    'descendantCount',
    'hasGeneratedId',
    'inlineData',
    'internalId',
    'isCommitting',
    'isCreating',
    'isValid',
    'previousSiblingsTotalCount',
    'visibleDescendantCount'
];
//# sourceMappingURL=BryntumCalendarProjectModel.js.map