// Generated by purs version 0.14.5
"use strict";
var Data_Bifunctor = require("../Data.Bifunctor/index.js");
var Data_Profunctor = require("../Data.Profunctor/index.js");
var Halogen_Component = require("../Halogen.Component/index.js");
var Halogen_Query_HalogenM = require("../Halogen.Query.HalogenM/index.js");
var Halogen_Query_HalogenQ = require("../Halogen.Query.HalogenQ/index.js");
var ProComponent = function (x) {
    return x;
};
var newtypeProComponent = {
    Coercible0: function () {
        return undefined;
    }
};
var dimapSpec = function (dictFunctor) {
    return function (f) {
        return function (g) {
            return function (spec) {
                return {
                    initialState: function ($6) {
                        return spec.initialState(f($6));
                    },
                    render: spec.render,
                    "eval": Data_Profunctor.dimap(Data_Profunctor.profunctorFn)(Data_Bifunctor.lmap(Halogen_Query_HalogenQ.bifunctorHalogenQ)(f))(Halogen_Query_HalogenM.mapOutput(g))(spec["eval"])
                };
            };
        };
    };
};
var profunctorProComponent = function (dictFunctor) {
    return {
        dimap: function (f) {
            return function (g) {
                return function (v) {
                    return Halogen_Component.unComponent((function () {
                        var $7 = dimapSpec(dictFunctor)(f)(g);
                        return function ($8) {
                            return Halogen_Component.mkComponent($7($8));
                        };
                    })())(v);
                };
            };
        }
    };
};
module.exports = {
    ProComponent: ProComponent,
    newtypeProComponent: newtypeProComponent,
    profunctorProComponent: profunctorProComponent
};
