(window.webpackJsonp = window.webpackJsonp || []).push([
    [18],
    {
        133: function (e, t, a) {
            "use strict";
            a.d(t, "b", function () {
                return s;
            }),
                a.d(t, "d", function () {
                    return o;
                }),
                a.d(t, "a", function () {
                    return l;
                }),
                a.d(t, "c", function () {
                    return m;
                });
            var n = a(39),
                i = a(17),
                r = a(15),
                c = a.n(r),
                s = function (e, t) {
                    return function (a) {
                        return c.a
                            .post(i.j, { token: e, store_id: t })
                            .then(function (e) {
                                var t = e.data;
                                return a({ type: n.a, payload: t });
                            })
                            .catch(function (e) {
                                console.log(e);
                            });
                    };
                },
                o = function (e, t, a) {
                    return function (n) {
                        return c.a
                            .post(i.B, { token: e, item_id: t, store_id: a })
                            .then(function (e) {
                                return e.data;
                            })
                            .catch(function (e) {
                                console.log(e);
                            });
                    };
                },
                l = function (e, t) {
                    return function (a) {
                        return c.a
                            .post(i.i, { token: e, store_id: t })
                            .then(function (e) {
                                var t = e.data;
                                return a({ type: n.b, payload: t });
                            })
                            .catch(function (e) {
                                console.log(e);
                            });
                    };
                },
                m = function (e, t, a) {
                    return function (n) {
                        return c.a
                            .post(i.A, { token: e, category_id: t, store_id: a })
                            .then(function (e) {
                                return e.data;
                            })
                            .catch(function (e) {
                                console.log(e);
                            });
                    };
                };
        },
        138: function (e, t, a) {
            "use strict";
            var n = a(0);
            function i() {
                return (i =
                    Object.assign ||
                    function (e) {
                        for (var t = 1; t < arguments.length; t++) {
                            var a = arguments[t];
                            for (var n in a) Object.prototype.hasOwnProperty.call(a, n) && (e[n] = a[n]);
                        }
                        return e;
                    }).apply(this, arguments);
            }
            var r = function () {
                    return Math.random().toString(36).substring(2);
                },
                c = function (e) {
                    var t = e.animate,
                        a = e.ariaLabel,
                        c = e.children,
                        s = e.className,
                        o = e.height,
                        l = e.preserveAspectRatio,
                        m = e.primaryColor,
                        d = e.primaryOpacity,
                        u = e.rtl,
                        p = e.secondaryColor,
                        h = e.secondaryOpacity,
                        g = e.speed,
                        f = e.style,
                        b = e.uniquekey,
                        E = e.width,
                        v = (function (e, t) {
                            if (null == e) return {};
                            var a,
                                n,
                                i = {},
                                r = Object.keys(e);
                            for (n = 0; n < r.length; n++) (a = r[n]), t.indexOf(a) >= 0 || (i[a] = e[a]);
                            return i;
                        })(e, ["animate", "ariaLabel", "children", "className", "height", "preserveAspectRatio", "primaryColor", "primaryOpacity", "rtl", "secondaryColor", "secondaryOpacity", "speed", "style", "uniquekey", "width"]),
                        y = b ? b + "-idClip" : r(),
                        w = b ? b + "-idGradient" : r(),
                        I = u ? ["1; -3", "2; -2", "3; -1"] : ["-3; 1", "-2; 2", "-1; 3"];
                    return Object(n.createElement)(
                        "svg",
                        i({ role: "img", style: f, className: s, "aria-labelledby": a || null, viewBox: "0 0 " + E + " " + o, preserveAspectRatio: l }, v),
                        a ? Object(n.createElement)("title", null, a) : null,
                        Object(n.createElement)("rect", { x: "0", y: "0", width: E, height: o, clipPath: "url(#" + y + ")", style: { fill: "url(#" + w + ")" } }),
                        Object(n.createElement)(
                            "defs",
                            null,
                            Object(n.createElement)("clipPath", { id: y }, c),
                            Object(n.createElement)(
                                "linearGradient",
                                { id: w },
                                Object(n.createElement)("stop", { offset: "0%", stopColor: m, stopOpacity: d }, t && Object(n.createElement)("animate", { attributeName: "offset", values: I[0], dur: g + "s", repeatCount: "indefinite" })),
                                Object(n.createElement)("stop", { offset: "50%", stopColor: p, stopOpacity: h }, t && Object(n.createElement)("animate", { attributeName: "offset", values: I[1], dur: g + "s", repeatCount: "indefinite" })),
                                Object(n.createElement)("stop", { offset: "100%", stopColor: m, stopOpacity: d }, t && Object(n.createElement)("animate", { attributeName: "offset", values: I[2], dur: g + "s", repeatCount: "indefinite" }))
                            )
                        )
                    );
                },
                s = {
                    animate: !0,
                    ariaLabel: "Loading interface...",
                    height: 130,
                    preserveAspectRatio: "xMidYMid meet",
                    primaryColor: "#f0f0f0",
                    primaryOpacity: 1,
                    rtl: !1,
                    secondaryColor: "#e0e0e0",
                    secondaryOpacity: 1,
                    speed: 2,
                    width: 400,
                },
                o = function (e) {
                    return Object(n.createElement)("rect", { x: "0", y: "0", rx: "5", ry: "5", width: e.width, height: e.height });
                },
                l = function (e) {
                    var t = i({}, s, e),
                        a = e.children ? e.children : Object(n.createElement)(o, t);
                    return Object(n.createElement)(c, t, a);
                };
            t.a = l;
        },
        139: function (e, t, a) {
            "use strict";
            var n = a(22),
                i = a(23),
                r = a(25),
                c = a(24),
                s = a(26),
                o = a(0),
                l = a.n(o),
                m = a(3),
                d = a(237),
                u = a(45),
                p = a(34),
                h = a(133),
                g = (function (e) {
                    function t() {
                        var e, a;
                        Object(n.a)(this, t);
                        for (var i = arguments.length, s = new Array(i), o = 0; o < i; o++) s[o] = arguments[o];
                        return (
                            ((a = Object(r.a)(this, (e = Object(c.a)(t)).call.apply(e, [this].concat(s)))).state = { singleItemSwitchState: !1 }),
                            (a.__toggleSingleItemSwitch = function (e, t) {
                                a.setState({ singleItemSwitchState: !a.state.singleItemSwitchState }),
                                    a.props.toggleItemStatus(a.props.user.data.auth_token, t, localStorage.getItem("selected_store_id")).then(function (t) {
                                        t &&
                                            t.success &&
                                            (1 === t.status
                                                ? (a.props.enqueueSnackbar(e + localStorage.getItem("itemsPage_toggleTrue"), { variant: "success" }), a.setState({ singleItemSwitchState: !0 }))
                                                : (a.props.enqueueSnackbar(e + localStorage.getItem("itemsPage_toggleFalse"), { variant: "warning" }), a.setState({ singleItemSwitchState: !1 })));
                                    });
                            }),
                            a
                        );
                    }
                    return (
                        Object(s.a)(t, e),
                        Object(i.a)(t, [
                            {
                                key: "componentDidMount",
                                value: function () {
                                    1 === this.props.item.is_active && this.setState({ singleItemSwitchState: !0 });
                                },
                            },
                            {
                                key: "componentWillReceiveProps",
                                value: function (e) {
                                    1 === e.item.is_active ? this.setState({ singleItemSwitchState: !0 }) : this.setState({ singleItemSwitchState: !1 });
                                },
                            },
                            {
                                key: "shouldComponentUpdate",
                                value: function (e, t) {
                                    return this.props.item !== e.item || this.state.singleItemSwitchState !== t.singleItemSwitchState;
                                },
                            },
                            {
                                key: "render",
                                value: function () {
                                    var e = this,
                                        t = this.props.item;
                                    return l.a.createElement(
                                        l.a.Fragment,
                                        null,
                                        l.a.createElement(
                                            "div",
                                            { className: "d-flex justify-content-between align-items-center menuSingleItem" },
                                            l.a.createElement(
                                                "div",
                                                {
                                                    className: "d-flex justify-content-start align-items-center",
                                                    onClick: function () {
                                                        return e.props.openItemEditDrawer(t.id);
                                                    },
                                                },
                                                null !== t.image && l.a.createElement("img", { src: m.a + t.image, alt: t.name, className: "menuItemImage" }),
                                                l.a.createElement(
                                                    "div",
                                                    null,
                                                    l.a.createElement("span", { className: "menuItemName" }, t.name),
                                                    " ",
                                                    l.a.createElement("br", null),
                                                    " ",
                                                    l.a.createElement("span", { className: "menuItemPrice" }, localStorage.getItem("currencyFormat"), t.price)
                                                )
                                            ),
                                            l.a.createElement(
                                                "div",
                                                null,
                                                l.a.createElement(d.a, {
                                                    checked: this.state.singleItemSwitchState,
                                                    onChange: function () {
                                                        return e.__toggleSingleItemSwitch(t.name, t.id);
                                                    },
                                                })
                                            )
                                        )
                                    );
                                },
                            },
                        ]),
                        t
                    );
                })(o.Component);
            t.a = Object(p.b)(
                function (e) {
                    return { user: e.user.user, menu: e.menu.menu };
                },
                { toggleItemStatus: h.d }
            )(Object(u.b)(g));
        },
        140: function (e, t, a) {
            "use strict";
            var n = a(65),
                i = a(22),
                r = a(23),
                c = a(25),
                s = a(24),
                o = a(26),
                l = a(0),
                m = a.n(l),
                d = a(223),
                u = a(15),
                p = a.n(u),
                h = a(34),
                g = a(17),
                f = a(3),
                b = a(45),
                E = (function (e) {
                    function t() {
                        var e, a;
                        Object(i.a)(this, t);
                        for (var r = arguments.length, o = new Array(r), l = 0; l < r; l++) o[l] = arguments[l];
                        return (
                            ((a = Object(c.a)(this, (e = Object(s.a)(t)).call.apply(e, [this].concat(o)))).state = { loading: !1, itemEditDrawer: !1, data: [], name: "", price: "", old_price: "", showUpdateButton: !1, itemUpdated: !1 }),
                            (a.handleInputChange = function (e) {
                                a.setState(Object(n.a)({}, e.target.name, e.target.value), function () {
                                    a.validateUpdateItem();
                                });
                            }),
                            (a.toggleItemEditDrawer = function () {
                                a.setState({ itemEditDrawer: !1 }), a.props.closeItemEditDrawer(a.state.itemUpdated);
                            }),
                            (a.fetchItemDetails = function (e) {
                                a.setState({ loading: !0 }),
                                    p.a.post(g.d, { item_id: e, token: a.props.user.data.auth_token, store_id: localStorage.getItem("selected_store_id") }).then(function (e) {
                                        e.data &&
                                            (a.setState({ data: e.data, name: e.data.name, price: e.data.price, old_price: e.data.old_price, loading: !1 }, function () {
                                                a.validateUpdateItem();
                                            }),
                                            a.setState({ itemEditDrawer: !0 }));
                                    });
                            }),
                            (a.handleItemUpdate = function (e) {
                                e.preventDefault(),
                                    a.validateUpdateItem() &&
                                        (a.setState({ loading: !0 }),
                                        p.a.post(g.D, { item_id: a.state.data.id, name: a.state.name, price: a.state.price, old_price: a.state.old_price, token: a.props.user.data.auth_token, store_id: localStorage.getItem("selected_store_id") }).then(function (e) {
                                            e.data &&
                                                (a.setState({ itemUpdated: !0 }),
                                                a.fetchItemDetails(a.state.data.id),
                                                setTimeout(function () {
                                                    a.props.enqueueSnackbar(a.state.name + " updated.", { variant: "success" });
                                                }, 250));
                                        }));
                            }),
                            (a.validateUpdateItem = function () {
                                return a.state.name.length > 0 && a.state.name.length <= 190 && n.state.old_price >=0 && /^[0-9]+\.?[0-9]*$/.test(a.state.price) ? (a.setState({ showUpdateButton: !0 }), !0) : (a.setState({ showUpdateButton: !1 }), !1);
                            }),
                            (a.changeImage = function () {
                                "FoodomaaAndroidWebViewUA" === navigator.userAgent && "undefined" !== window.Android && window.Android.changeItemImage(a.state.data.id);
                            }),
                            (a.inputFocus = function () {
                                a.refs.itemEditBlock.style.height = "80vh";
                            }),
                            (a.handleClickOutside = function (e) {
                                a.refs.itemEditBlock && (a.refs.itemEditBlock.style.height = "auto");
                            }),
                            a
                        );
                    }
                    return (
                        Object(o.a)(t, e),
                        Object(r.a)(t, [
                            {
                                key: "componentDidMount",
                                value: function () {
                                    document.addEventListener("mousedown", this.handleClickOutside);
                                },
                            },
                            {
                                key: "componentWillReceiveProps",
                                value: function (e) {
                                    e.itemEditDrawer !== this.state.itemEditDrawer && this.setState({ itemEditDrawer: e.itemEditDrawer }), !0 === e.itemEditDrawer && (this.setState({ itemUpdated: !1 }), this.fetchItemDetails(e.item_id));
                                },
                            },
                            {
                                key: "componentWillUnmount",
                                value: function () {
                                    document.removeEventListener("mousedown", this.handleClickOutside);
                                },
                            },
                            {
                                key: "render",
                                value: function () {
                                    var e = this,
                                        t = this.state.data;
                                    return m.a.createElement(
                                        m.a.Fragment,
                                        null,
                                        m.a.createElement(
                                            d.a,
                                            {
                                                anchor: "bottom",
                                                open: this.state.itemEditDrawer,
                                                onClose: function () {
                                                    return e.toggleItemEditDrawer();
                                                },
                                            },
                                            this.state.loading
                                                ? m.a.createElement("div", { className: "bg-store-light" }, m.a.createElement("div", { className: "itemEditContainer pt-100" }, m.a.createElement("div", { className: "spin-load" })))
                                                : m.a.createElement(
                                                      "div",
                                                      { className: "bg-store-light itemEditContainer" },
                                                      m.a.createElement("div", { className: "d-flex justify-content-between align-items-center" }, m.a.createElement("h3", { className: "mx-15 px-20 mt-20" }, "Edit Item")),
                                                      m.a.createElement("hr", { className: "mt-0" }),
                                                      m.a.createElement(
                                                          "form",
                                                          { onSubmit: this.handleItemUpdate, className: "mx-15 p-2", ref: "itemEditBlock" },
                                                          null !== t.image
                                                              ? m.a.createElement(
                                                                    "div",
                                                                    { className: "col-md-12 mb-20" },
                                                                    m.a.createElement(
                                                                        "div",
                                                                        { className: "d-flex justify-content-start  align-items-center" },
                                                                        m.a.createElement("img", { src: f.a + t.image, alt: t.name, className: "itemEditImage mr-10" }),
                                                                        m.a.createElement("button", { type: "button", onClick: this.changeImage, className: "btn btn-md btn-default change-image" }, "Change Image")
                                                                    )
                                                                )
                                                              : m.a.createElement(
                                                                    "div",
                                                                    { className: "col-md-12" },
                                                                    m.a.createElement("button", { type: "button", onClick: this.changeImage, className: "btn btn-md btn-default add-image" }, "Add Image")
                                                                ),
                                                          m.a.createElement(
                                                              "div",
                                                              { className: "form-group mb-20" },
                                                              m.a.createElement(
                                                                  "div",
                                                                  { className: "col-md-12 pb-15" },
                                                                  u.a.createElement("p", { className: "itemEditInputLabel mb-2" }, t.name),
                                                                  m.a.createElement("p", { className: "itemEditInputLabel" }, "Mark Price "),
                                                                  m.a.createElement("input", {
                                                                      type: "text",
                                                                      name: "old_price",
                                                                      defaultValue: t.old_price,
                                                                      onChange: this.handleInputChange,
                                                                      className: "itemEditTextInput",
                                                                      ref: "nameInput",
                                                                      onFocus: this.inputFocus,
                                                                      onBlur: this.handleClickOutside,
                                                                  })
                                                              ),
                                                              m.a.createElement(
                                                                  "div",
                                                                  { className: "col-md-12 pb-15" },
                                                                  m.a.createElement("p", { className: "itemEditInputLabel" }, "Price "),
                                                                  m.a.createElement("input", {
                                                                      type: "text",
                                                                      name: "price",
                                                                      defaultValue: t.price,
                                                                      onChange: this.handleInputChange,
                                                                      className: "itemEditTextInput",
                                                                      ref: "priceInput",
                                                                      onFocus: this.inputFocus,
                                                                      onBlur: this.handleClickOutside,
                                                                  })
                                                              )
                                                          ),
                                                          m.a.createElement(
                                                              "div",
                                                              { className: "mx-15 mb-20 d-flex justify-content-center" },
                                                              m.a.createElement("button", { type: "button", className: "btn btn-md btnItemUpdateCancel mr-15", onClick: this.toggleItemEditDrawer }, "Cancel"),
                                                              this.state.showUpdateButton
                                                                  ? m.a.createElement("button", { type: "submit", className: "btn btn-md btnItemUpdate" }, "Update")
                                                                  : m.a.createElement("button", { type: "button", className: "btn btn-md btnItemUpdateCancel" }, "Update")
                                                          )
                                                      )
                                                  )
                                        )
                                    );
                                },
                            },
                        ]),
                        t
                    );
                })(l.Component);
            t.a = Object(h.b)(function (e) {
                return { user: e.user.user };
            }, {})(Object(b.b)(E));
        },
        145: function (e, t, a) {
            "use strict";
            var n = a(22),
                i = a(23),
                r = a(25),
                c = a(24),
                s = a(26),
                o = a(0),
                l = a.n(o),
                m = a(138),
                d = (function (e) {
                    function t() {
                        return Object(n.a)(this, t), Object(r.a)(this, Object(c.a)(t).apply(this, arguments));
                    }
                    return (
                        Object(s.a)(t, e),
                        Object(i.a)(t, [
                            {
                                key: "render",
                                value: function () {
                                    return l.a.createElement(
                                        m.a,
                                        { height: window.innerHeight, width: window.innerWidth, speed: 1.2, primaryColor: "#f3f3f3", secondaryColor: "#ecebeb" },
                                        l.a.createElement("rect", { x: "0", y: "15", rx: "0", ry: "0", width: window.innerWidth, height: "80" }),
                                        l.a.createElement("rect", { x: "0", y: "110", rx: "0", ry: "0", width: window.innerWidth, height: "80" }),
                                        l.a.createElement("rect", { x: "0", y: "205", rx: "0", ry: "0", width: window.innerWidth, height: "80" }),
                                        l.a.createElement("rect", { x: "0", y: "300", rx: "0", ry: "0", width: window.innerWidth, height: "80" })
                                    );
                                },
                            },
                        ]),
                        t
                    );
                })(o.Component);
            t.a = d;
        },
        232: function (e, t, a) {
            "use strict";
            a.r(t);
            var n = a(22),
                i = a(23),
                r = a(25),
                c = a(24),
                s = a(26),
                o = a(0),
                l = a.n(o),
                m = a(133),
                d = a(34),
                u = a(139),
                p = a(140),
                h = a(145),
                g = (function (e) {
                    function t() {
                        var e, a;
                        Object(n.a)(this, t);
                        for (var i = arguments.length, s = new Array(i), o = 0; o < i; o++) s[o] = arguments[o];
                        return (
                            ((a = Object(r.a)(this, (e = Object(c.a)(t)).call.apply(e, [this].concat(s)))).state = { loading: !0, itemEditDrawer: !1, item_edit_id: null }),
                            (a.openItemEditDrawer = function (e) {
                                a.setState({ itemEditDrawer: !0, item_edit_id: e });
                            }),
                            (a.closeItemEditDrawer = function (e) {
                                if ((a.setState({ itemEditDrawer: !1, item_edit_id: null }), e)) {
                                    var t = a.props.user;
                                    a.setState({ loading: !0 }),
                                        a.props.getInactiveItems(t.data.auth_token, localStorage.getItem("selected_store_id")).then(function (e) {
                                            e && e.payload && a.setState({ loading: !1 });
                                        });
                                }
                            }),
                            a
                        );
                    }
                    return (
                        Object(s.a)(t, e),
                        Object(i.a)(t, [
                            {
                                key: "componentDidMount",
                                value: function () {
                                    var e = this,
                                        t = this.props.user;
                                    this.props.getInactiveItems(t.data.auth_token, localStorage.getItem("selected_store_id")).then(function (t) {
                                        t && t.payload && e.setState({ loading: !1 });
                                    });
                                },
                            },
                            {
                                key: "render",
                                value: function () {
                                    var e = this,
                                        t = this.props.inactive_items;
                                    return l.a.createElement(
                                        l.a.Fragment,
                                        null,
                                        l.a.createElement("div", { className: "pageTitle bg-primary-gradient" }, "Inactive Items"),
                                        l.a.createElement(
                                            "div",
                                            { className: "pageContents" },
                                            this.state.loading
                                                ? l.a.createElement("div", { className: "mx-20 mt-15" }, l.a.createElement(h.a, null))
                                                : l.a.createElement(
                                                      l.a.Fragment,
                                                      null,
                                                      Object.keys(t).length > 0 &&
                                                          l.a.createElement(
                                                              "div",
                                                              { className: "mt-15 mb-100" },
                                                              Object.keys(t).map(function (a, n) {
                                                                  return l.a.createElement(
                                                                      "div",
                                                                      { key: a + "-" + n },
                                                                      l.a.createElement(
                                                                          "div",
                                                                          { className: "mx-15 mb-15 menuCategoryWrapper p-3" },
                                                                          l.a.createElement("div", { className: "menuCategoryName mb-3" }, a),
                                                                          t[a].map(function (t) {
                                                                              return l.a.createElement(l.a.Fragment, { key: t.id }, l.a.createElement(u.a, { item: t, openItemEditDrawer: e.openItemEditDrawer }));
                                                                          })
                                                                      )
                                                                  );
                                                              })
                                                          ),
                                                      l.a.createElement(p.a, { itemEditDrawer: this.state.itemEditDrawer, item_id: this.state.item_edit_id, closeItemEditDrawer: this.closeItemEditDrawer })
                                                  )
                                        )
                                    );
                                },
                            },
                        ]),
                        t
                    );
                })(o.Component);
            t.default = Object(d.b)(
                function (e) {
                    return { user: e.user.user, inactive_items: e.menu.inactive_items };
                },
                { getInactiveItems: m.a }
            )(g);
        },
    },
]);
