// Generated by purs version 0.14.5
"use strict";
var $foreign = require("./foreign.js");
var Data_Enum = require("../Data.Enum/index.js");
var Data_Functor = require("../Data.Functor/index.js");
var Data_Maybe = require("../Data.Maybe/index.js");
var Effect = require("../Effect/index.js");
var Unsafe_Coerce = require("../Unsafe.Coerce/index.js");
var Web_HTML_HTMLMediaElement_CanPlayType = require("../Web.HTML.HTMLMediaElement.CanPlayType/index.js");
var Web_HTML_HTMLMediaElement_NetworkState = require("../Web.HTML.HTMLMediaElement.NetworkState/index.js");
var Web_HTML_HTMLMediaElement_ReadyState = require("../Web.HTML.HTMLMediaElement.ReadyState/index.js");
var Web_Internal_FFI = require("../Web.Internal.FFI/index.js");
var toParentNode = Unsafe_Coerce.unsafeCoerce;
var toNonDocumentTypeChildNode = Unsafe_Coerce.unsafeCoerce;
var toNode = Unsafe_Coerce.unsafeCoerce;
var toHTMLElement = Unsafe_Coerce.unsafeCoerce;
var toEventTarget = Unsafe_Coerce.unsafeCoerce;
var toElement = Unsafe_Coerce.unsafeCoerce;
var toChildNode = Unsafe_Coerce.unsafeCoerce;
var readyState = function (el) {
    return Data_Functor.map(Effect.functorEffect)((function () {
        var $0 = Data_Maybe.fromMaybe(Web_HTML_HTMLMediaElement_ReadyState.HaveNothing.value);
        var $1 = Data_Enum.toEnum(Web_HTML_HTMLMediaElement_ReadyState.boundedEnumReadyState);
        return function ($2) {
            return $0($1($2));
        };
    })())(function () {
        return $foreign["_readyState"](el);
    });
};
var networkState = function (el) {
    return Data_Functor.map(Effect.functorEffect)((function () {
        var $3 = Data_Maybe.fromMaybe(Web_HTML_HTMLMediaElement_NetworkState.Empty.value);
        var $4 = Data_Enum.toEnum(Web_HTML_HTMLMediaElement_NetworkState.boundedEnumNetworkState);
        return function ($5) {
            return $3($4($5));
        };
    })())(function () {
        return $foreign["_networkState"](el);
    });
};
var fromParentNode = Web_Internal_FFI.unsafeReadProtoTagged("HTMLMediaElement");
var fromNonDocumentTypeChildNode = Web_Internal_FFI.unsafeReadProtoTagged("HTMLMediaElement");
var fromNode = Web_Internal_FFI.unsafeReadProtoTagged("HTMLMediaElement");
var fromHTMLElement = Web_Internal_FFI.unsafeReadProtoTagged("HTMLMediaElement");
var fromEventTarget = Web_Internal_FFI.unsafeReadProtoTagged("HTMLMediaElement");
var fromElement = Web_Internal_FFI.unsafeReadProtoTagged("HTMLMediaElement");
var fromChildNode = Web_Internal_FFI.unsafeReadProtoTagged("HTMLMediaElement");
var canPlayType = function (ty) {
    return function (el) {
        return Data_Functor.map(Effect.functorEffect)((function () {
            var $6 = Data_Maybe.fromMaybe(Web_HTML_HTMLMediaElement_CanPlayType.Unspecified.value);
            return function ($7) {
                return $6(Web_HTML_HTMLMediaElement_CanPlayType.parse($7));
            };
        })())(function () {
            return $foreign["_canPlayType"](ty, el);
        });
    };
};
module.exports = {
    fromHTMLElement: fromHTMLElement,
    fromElement: fromElement,
    fromNode: fromNode,
    fromChildNode: fromChildNode,
    fromNonDocumentTypeChildNode: fromNonDocumentTypeChildNode,
    fromParentNode: fromParentNode,
    fromEventTarget: fromEventTarget,
    toHTMLElement: toHTMLElement,
    toElement: toElement,
    toNode: toNode,
    toChildNode: toChildNode,
    toNonDocumentTypeChildNode: toNonDocumentTypeChildNode,
    toParentNode: toParentNode,
    toEventTarget: toEventTarget,
    networkState: networkState,
    canPlayType: canPlayType,
    readyState: readyState,
    src: $foreign.src,
    setSrc: $foreign.setSrc,
    currentSrc: $foreign.currentSrc,
    crossOrigin: $foreign.crossOrigin,
    setCrossOrigin: $foreign.setCrossOrigin,
    preload: $foreign.preload,
    setPreload: $foreign.setPreload,
    load: $foreign.load,
    seeking: $foreign.seeking,
    currentTime: $foreign.currentTime,
    setCurrentTime: $foreign.setCurrentTime,
    duration: $foreign.duration,
    getStartDate: $foreign.getStartDate,
    paused: $foreign.paused,
    defaultPlaybackRate: $foreign.defaultPlaybackRate,
    setDefaultPlaybackRate: $foreign.setDefaultPlaybackRate,
    playbackRate: $foreign.playbackRate,
    setPlaybackRate: $foreign.setPlaybackRate,
    ended: $foreign.ended,
    autoplay: $foreign.autoplay,
    setAutoplay: $foreign.setAutoplay,
    loop: $foreign.loop,
    setLoop: $foreign.setLoop,
    play: $foreign.play,
    pause: $foreign.pause,
    mediaGroup: $foreign.mediaGroup,
    setMediaGroup: $foreign.setMediaGroup,
    controls: $foreign.controls,
    setControls: $foreign.setControls,
    volume: $foreign.volume,
    setVolume: $foreign.setVolume,
    muted: $foreign.muted,
    setMuted: $foreign.setMuted,
    defaultMuted: $foreign.defaultMuted,
    setDefaultMuted: $foreign.setDefaultMuted
};
