//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// PLAIN HELPERS REPRESENTED AS SIMPLE FUNCTIONS —
// FOR INVOCATION FROM WASM (.NET-BLAZOR) AND, POSSIBLY, FROM PLAIN JS (HTML/SCRIPT):
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//==================================================================================================
// ELEMENT HELPERS:
//--------------------------------------------------------------------------------------------------
function Element_GetId(element) {
    HArgChecking.NOT_NULL(element, 'Element_GetId', 'element');
    return element.id;
}
//--------------------------------------------------------------------------------------------------
function Element_IsDisabled(element) {
    HArgChecking.NOT_NULL(element, 'Element_IsDisabled', 'element');
    return HElement.IsDisabled(element);
}
//--------------------------------------------------------------------------------------------------
function Element_HasAttribute(element, attributeName) {
    HArgChecking.NOT_NULL(element, 'Element_HasAttribute', 'attributeName');
    let elem = element;
    return elem && elem.getAttribute ? elem.hasAttribute(attributeName) : false;
}
function Element_GetAttribute(element, attributeName) {
    HArgChecking.NOT_NULL(element, 'Element_GetAttribute', 'attributeName');
    let elem = element;
    return elem && elem.getAttribute ? elem.getAttribute(attributeName) : null;
}
function Element_SetAttribute(element, attributeName, value) {
    HArgChecking.NOT_NULL(element, 'Element_SetAttribute', 'attributeName');
    var elem = element;
    if (!elem && !elem.setAttribute)
        return false;
    elem.setAttribute(attributeName, value);
    return true;
}
function Element_RemoveAttribute(element, attributeName) {
    HArgChecking.NOT_NULL(element, 'Element_RemoveAttribute', 'attributeName');
    var elem = element;
    if (!elem || !elem.removeAttribute)
        return false;
    elem.removeAttribute(attributeName);
    return true;
}
//--------------------------------------------------------------------------------------------------
function Element_GetStyleProperty(element, propertyName) {
    HArgChecking.NOT_NULL(element, 'Element_GetStyleProperty', 'propertyName');
    return element.style ? element.style.getPropertyValue(propertyName) : null;
}
function Element_SetStyleProperty(element, propertyName, value) {
    HArgChecking.NOT_NULL(element, 'Element_SetStyleProperty', 'propertyName');
    if (!element.style)
        return false;
    element.style.setProperty(propertyName, value);
    return true;
}
function Element_RemoveStyleProperty(element, propertyName) {
    HArgChecking.NOT_NULL(element, 'Element_RemoveStyleProperty', 'propertyName');
    if (!element.style)
        return false;
    element.style.removeProperty(propertyName);
    return true;
}
//--------------------------------------------------------------------------------------------------
function Element_ContainsFocus(element) {
    HArgChecking.NOT_NULL(element, 'Element_ContainsFocus', 'element');
    return HElement.ContainsFocus(element);
}
function Element_IsFocused(element) {
    HArgChecking.NOT_NULL(element, 'Element_IsFocused', 'element');
    return HElement.IsFocused(element);
}
//--------------------------------------------------------------------------------------------------
function Element_Click(element) {
    HArgChecking.NOT_NULL(element, 'Element_Click', 'element');
    return HElement.Click(element);
}
function Element_DeferredClick(element, milliseconds = 0) {
    HArgChecking.NOT_NULL(element, 'Element_DeferredClick', 'element');
    return HElement.DeferredClick(element, milliseconds);
}
function Element_Focus(element) {
    HArgChecking.NOT_NULL(element, 'Element_Focus', 'element');
    element.focus();
}
function Element_DeferredFocus(element, milliseconds = 0) {
    HArgChecking.NOT_NULL(element, 'Element_DeferredFocus', 'element');
    HElement.DeferredFocus(element, milliseconds);
}
function Element_Select(element) {
    HArgChecking.NOT_NULL(element, 'Element_Select', 'element');
    return HElement.Select(element);
}
function Element_DeferredSelect(element, milliseconds = 0) {
    HArgChecking.NOT_NULL(element, 'Element_DeferredSelect', 'element');
    return HElement.DeferredSelect(element, milliseconds);
}
function Element_FocusSelect(element) {
    HArgChecking.NOT_NULL(element, 'Element_FocusSelect', 'element');
    HElement.FocusSelect(element);
}
function Element_DeferredFocusSelect(element, milliseconds = 0) {
    HArgChecking.NOT_NULL(element, 'Element_DeferredFocusSelect', 'element');
    HElement.DeferredFocusSelect(element, milliseconds);
}
//--------------------------------------------------------------------------------------------------
function Element_SelectAll(container) {
    HArgChecking.NOT_NULL(container, 'Element_SelectAll', 'container');
    return HElement.SelectAll(container);
}
function Element_DeferredSelectAll(container, milliseconds = 0) {
    HArgChecking.NOT_NULL(container, 'Element_DeferredSelectAll', 'container');
    HElement.DeferredSelectAll(container, milliseconds);
}
//--------------------------------------------------------------------------------------------------
function Element_ScrollIntoView(element) {
    HArgChecking.NOT_NULL(element, 'Element_ScrollIntoViewElement', 'element');
    element.scrollIntoView();
}
function Element_DeferredScrollTo(element, milliseconds = 0) {
    HArgChecking.NOT_NULL(element, 'DeferredScrollIntoView', 'element');
    HElement.DeferredScrollIntoView(element, milliseconds);
}
//==================================================================================================
// BY-ID HELPERS:
//--------------------------------------------------------------------------------------------------
function ById_Exists(id) {
    HArgChecking.PROVIDED(id, 'ById_Exists', 'id');
    return HById.Exists(id);
}
function ById_Element(id) {
    HArgChecking.PROVIDED(id, 'ById_Element', 'id');
    return HElement.ById(id);
}
function ById_InputElement(id) {
    HArgChecking.PROVIDED(id, 'ById_InputElement', 'id');
    return HById.InputElement(id);
}
function ById_Focus(id) {
    HArgChecking.PROVIDED(id, 'ById_Focus', 'id');
    HElement.ById(id).focus();
}
function ById_Click(id) {
    HArgChecking.PROVIDED(id, 'ById_Click', 'id');
    HElement.ById(id).click();
}
function ById_DeferredFocus(id, milliseconds = 0) {
    HArgChecking.PROVIDED(id, 'ById_DeferredFocus', 'id');
    HElement.DeferredFocus(HElement.ById(id), milliseconds);
}
function ById_DeferredClick(id, milliseconds = 0) {
    HArgChecking.PROVIDED(id, 'ById_DeferredClick', 'id');
    HElement.DeferredClick(HElement.ById(id), milliseconds);
}
//--------------------------------------------------------------------------------------------------
function ById_ScrollIntoView(id) {
    HArgChecking.PROVIDED(id, 'ById_ScrollIntoView', 'id');
    HElement.ById(id).scrollIntoView();
}
function ById_DeferredScrollIntoView(id, milliseconds = 0) {
    HArgChecking.PROVIDED(id, 'ById_DeferredScrollIntoView', 'id');
    HElement.DeferredScrollIntoView(HElement.ById(id), milliseconds);
}
//==================================================================================================
// HREF HELPERS:
//--------------------------------------------------------------------------------------------------
function HRef_ScrollToId(id) {
    HArgChecking.PROVIDED(id, 'HRef_ScrollToId', 'id');
    HElement.ById(id).scrollIntoView();
    return false;
}
function HRef_ScrollToPageTop() {
    Page.ScrollToTop();
    return false;
}
function HRef_ScrollToPageBottom() {
    Page.ScrollToBottom();
    return false;
}
function HRef_DeferredScrollToId(id) {
    HArgChecking.PROVIDED(id, 'HRef_DeferredScrollToId', 'id');
    HElement.DeferredScrollIntoView(HElement.ById(id));
    return false;
}
function HRef_DeferredScrollToPageTop() {
    Page.DeferredScrollToTop();
    return false;
}
function HRef_DeferredScrollToPageBottom() {
    Page.DeferredScrollToBottom();
    return false;
}
function HRef_EscapeFocus(id = null) {
    if (id)
        HElement.ById(id).focus();
    else
        Page.FocusBackground();
}
//==================================================================================================
// CONSOLE HELPERS (TRACE):
//--------------------------------------------------------------------------------------------------
function Console_PrintError(message) {
    HArgChecking.NOT_NULL(message, 'Console_PrintError', 'message');
    console.error(message);
}
//==================================================================================================
//# sourceMappingURL=plain_helpers.js.map