import React from 'react';
import { ResourceView } from '@bryntum/calendar';
import { createWidget, shouldComponentUpdate, processWidgetContent } from './WrapperHelper.js';
export class BryntumResourceView extends React.Component {
    constructor() {
        super(...arguments);
        this.processWidgetContent = processWidgetContent;
    }
    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() {
        const className = `b-react-resource-view-container`;
        return (React.createElement("div", { className: className, ref: (element) => (this.element = element) }));
    }
}
BryntumResourceView.instanceClass = ResourceView;
BryntumResourceView.instanceName = 'ResourceView';
BryntumResourceView.configNames = [
    'activationKey',
    'adopt',
    'align',
    'anchor',
    'ariaDescription',
    'ariaLabel',
    'bbar',
    'bodyCls',
    'bubbleEvents',
    'centered',
    'collapsible',
    'color',
    'config',
    'constrainTo',
    'contentElementCls',
    'dataField',
    'defaultBindProperty',
    'defaultFocus',
    'defaults',
    'descriptionRenderer',
    'detectCSSCompatibilityIssues',
    'dock',
    'draggable',
    'drawer',
    'elementAttributes',
    'eventHeaderRenderer',
    'eventHeight',
    'eventRenderer',
    'eventSorter',
    'floating',
    'footer',
    'getPrimaryResource',
    'header',
    'hideAnimation',
    'hideWhenEmpty',
    'icon',
    'ignoreParentReadOnly',
    'includeTimeRanges',
    'itemCls',
    'lazyItems',
    'listeners',
    'localeClass',
    'localizable',
    'localizableProperties',
    'maskDefaults',
    'masked',
    'meta',
    'monitorResize',
    'namedItems',
    'owner',
    'positioned',
    'preventTooltipOnTouch',
    'relayStoreEvents',
    'resourceImagePath',
    'responsive',
    'responsiveRoot',
    'responsiveState',
    'responsiveTarget',
    'ripple',
    'rootElement',
    'scrollAction',
    'selectorButton',
    'selectorMenuItem',
    'shortEventCls',
    'shortEventDuration',
    'showAnimation',
    'showAvatars',
    'showBullet',
    'showResourceAvatars',
    'showTooltipWhenDisabled',
    'stableResourceOrder',
    'stateful',
    'statefulEvents',
    'stateId',
    'stateProvider',
    'strips',
    'tab',
    'tabBarItems',
    'tag',
    'tbar',
    'textAlign',
    'timeFormat',
    'trapFocus',
    'type',
    'ui',
    'weekStartDay',
    'weight'
];
BryntumResourceView.propertyConfigNames = [
    'alignSelf',
    'allowDragCreate',
    'allowDragMove',
    'allowDragResize',
    'animateTimeShift',
    'appendTo',
    'autoCreate',
    'callOnFunctions',
    'catchEventHandlerExceptions',
    'cls',
    'collapsed',
    'column',
    'dataset',
    'dateFormat',
    'dateSeparator',
    'defaultScrollOptions',
    'descriptionFormat',
    'disabled',
    'dragUnit',
    'extendAllDayEndDay',
    'extraData',
    'filterEventResources',
    'flex',
    'height',
    'hidden',
    'hideNonWorkingDays',
    'id',
    'inputFieldAlign',
    'insertBefore',
    'insertFirst',
    'items',
    'keyMap',
    'labelPosition',
    'layout',
    'layoutStyle',
    'margin',
    'maxDate',
    'maxHeight',
    'maximizeOnMobile',
    'maxWidth',
    'minDate',
    'minHeight',
    'minWidth',
    'nonWorkingDays',
    'onBeforeAutoCreate',
    'onBeforeChangeDate',
    'onBeforeDestroy',
    'onBeforeHide',
    'onBeforeResponsiveStateChange',
    'onBeforeSetRecord',
    'onBeforeShow',
    'onBeforeStateApply',
    'onBeforeStateSave',
    'onCatchAll',
    'onCollapse',
    'onDestroy',
    'onDirtyStateChange',
    'onElementCreated',
    'onEventAutoCreated',
    'onExpand',
    'onFocusIn',
    'onFocusOut',
    'onHide',
    'onPaint',
    'onReadOnly',
    'onRecompose',
    'onRefresh',
    'onResize',
    'onResponsiveStateChange',
    'onShow',
    'onToolClick',
    'onViewCreate',
    'pastEventCls',
    'range',
    'readOnly',
    'rendition',
    'resourceWidth',
    'rtl',
    'scrollable',
    'shortDateFormat',
    'shortDateTimeFormat',
    'span',
    'strictRecordMapping',
    'syncCalendarDate',
    'syncViewDate',
    'title',
    'tools',
    'tooltip',
    'view',
    'viewGap',
    'width',
    'x',
    'y'
];
BryntumResourceView.propertyNames = [
    'anchorSize',
    'dayCellCls',
    'firstVisibleCell',
    'firstVisibleDate',
    'focusVisible',
    'hasChanges',
    'isSettingValues',
    'isValid',
    'lastVisibleCell',
    'lastVisibleDate',
    'parent',
    'record',
    'state',
    'values'
];
//# sourceMappingURL=BryntumResourceView.js.map