"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ImagePropertyEditor = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const PropertyEditorImage_1 = require("./PropertyEditorImage");
const ObserveState_1 = require("../StateManagement/ObserveState");
const StateManager_1 = require("@appglue/common/dist/Common/StateManager");
const StoryData_1 = require("../StoryBook/StoryData");
class TextData {
    editObject = {};
    label = "Image Editor";
    propertyName = "image";
    updateCallback = () => {
        StateManager_1.StateManager.changed(this);
    };
}
exports.ImagePropertyEditor = [
    new StoryData_1.StoryNode(() => {
        let args = new TextData();
        return ((0, jsx_runtime_1.jsx)(ObserveState_1.ObserveState, { listenTo: args, control: () => {
                const image = Reflect.get(args.editObject, "image");
                return ((0, jsx_runtime_1.jsxs)("div", { style: {
                        display: "flex",
                        flexDirection: "column",
                        maxWidth: 200,
                    }, children: [(0, jsx_runtime_1.jsx)(PropertyEditorImage_1.PropertyEditorImage, { ...args }), (0, jsx_runtime_1.jsx)("img", { src: image, alt: "PropertyEditImage" })] }));
            } }));
    }, "Shared", "Property Editors", "Image"),
];
//# sourceMappingURL=PropertyEditorImage-stories.js.map