// Generated by purs version 0.14.5
"use strict";
var $foreign = require("./foreign.js");
var Data_Maybe = require("../Data.Maybe/index.js");
var Unsafe_Coerce = require("../Unsafe.Coerce/index.js");
var Open = (function () {
    function Open() {

    };
    Open.value = new Open();
    return Open;
})();
var Closed = (function () {
    function Closed() {

    };
    Closed.value = new Closed();
    return Closed;
})();
var toNode = Unsafe_Coerce.unsafeCoerce;
var showShadowRootMode = {
    show: function (v) {
        if (v instanceof Open) {
            return "open";
        };
        if (v instanceof Closed) {
            return "closed";
        };
        throw new Error("Failed pattern match at Web.DOM.ShadowRoot (line 22, column 1 - line 24, column 25): " + [ v.constructor.name ]);
    }
};
var mode = (function () {
    var modeFromString = function (v) {
        if (v === "open") {
            return new Data_Maybe.Just(Open.value);
        };
        if (v === "closed") {
            return new Data_Maybe.Just(Closed.value);
        };
        return Data_Maybe.Nothing.value;
    };
    return function ($4) {
        return modeFromString($foreign["_mode"]($4));
    };
})();
module.exports = {
    Open: Open,
    Closed: Closed,
    toNode: toNode,
    mode: mode,
    showShadowRootMode: showShadowRootMode,
    host: $foreign.host
};
