import store from "@/store";

export function PrintEmr(func) {

    this.setEditor = (editor, runtime) => {
        this.editor = editor;
        this.runtime = runtime;

        editor.on('ready', () => {
            func(this.editor)
        })
    };

    this.getAppContext = () => {
        return {
            endpoints: {
                app: "/bdp/dataservice/api",
                his: import.meta.env.VITE_BASE_URL,
            }, input: {
                user: store.state.user.info.code,
                name: store.state.user.info.name
            }, login: {
                token: store.state.user.info.token,
                user: {
                    id: store.state.user.info.code,
                    name: store.state.user.info.name,
                }
            },
            data: {}
        }
    };


}
