"use strict";
//TODO: When TypeScript 2.0 drops, some of these interfaces can be converted to discriminated unions
Object.defineProperty(exports, "__esModule", { value: true });
exports.isSearchCommand = exports.isInvokeURLCommand = exports.isTargetedCommand = exports.isBasicCommand = exports.isSeparatorItem = exports.isFlyoutItem = exports.isCommandItem = void 0;
function isCommandItem(item) {
    return item.Function === "Command";
}
exports.isCommandItem = isCommandItem;
function isFlyoutItem(item) {
    return item.Function === "Flyout";
}
exports.isFlyoutItem = isFlyoutItem;
function isSeparatorItem(item) {
    return item.Function === "Separator";
}
exports.isSeparatorItem = isSeparatorItem;
function isBasicCommand(cmd) {
    return typeof (cmd.Action) != 'undefined';
}
exports.isBasicCommand = isBasicCommand;
function isTargetedCommand(cmd) {
    return typeof (cmd.Target) != 'undefined';
}
exports.isTargetedCommand = isTargetedCommand;
function isInvokeURLCommand(cmd) {
    return typeof (cmd.URL) != 'undefined' && typeof (cmd.DisableIfSelectionEmpty) != 'undefined';
}
exports.isInvokeURLCommand = isInvokeURLCommand;
function isSearchCommand(cmd) {
    return cmd["@xsi:type"] == "SearchCommandType";
}
exports.isSearchCommand = isSearchCommand;
//# sourceMappingURL=weblayout.js.map