'use strict';

var jobberHooks = require('@jobber/hooks');

function _interopNamespaceDefault(e) {
    var n = Object.create(null);
    if (e) {
        Object.keys(e).forEach(function (k) {
            if (k !== 'default') {
                var d = Object.getOwnPropertyDescriptor(e, k);
                Object.defineProperty(n, k, d.get ? d : {
                    enumerable: true,
                    get: function () { return e[k]; }
                });
            }
        });
    }
    n.default = e;
    return Object.freeze(n);
}

var jobberHooks__namespace = /*#__PURE__*/_interopNamespaceDefault(jobberHooks);

const mockContainerWidth = (exactWidth) => {
    jest.spyOn(jobberHooks__namespace, "useResizeObserver").mockReturnValue([
        { current: document.createElement("div") },
        {
            width: 1200,
            height: 800,
            exactWidth: exactWidth || 1200,
            exactHeight: 800,
        },
    ]);
};

exports.mockContainerWidth = mockContainerWidth;
