"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const id_1 = require("../../client/id");
const assert_1 = require("../../util/assert");
(0, assert_1.default)((0, id_1.kebabToCamel)('a-b-c') === 'aBC');
(0, assert_1.default)((0, id_1.kebabToCamel)('aBC') === 'aBC');
(0, assert_1.default)((0, id_1.kebabToCamel)('kebab-to-camel') === 'kebabToCamel');
(0, assert_1.default)((0, id_1.kebabToCamel)('kebabToCamel') === 'kebabToCamel');
(0, assert_1.default)((0, id_1.camelToKebab)('aBC') === 'a-b-c');
(0, assert_1.default)((0, id_1.camelToKebab)('kebabToCamel') === 'kebab-to-camel');
(0, assert_1.default)((0, id_1.camelToKebab)('a-b-c') === 'a-b-c');
(0, assert_1.default)((0, id_1.camelToSnake)('aBC') === 'a_b_c');
(0, assert_1.default)((0, id_1.camelToSnake)('kebabToCamel') === 'kebab_to_camel');
(0, assert_1.default)((0, id_1.camelToSnake)('a_b_c') === 'a_b_c');
(0, assert_1.default)(!!id_1.idRegex.exec('a'));
(0, assert_1.default)(!id_1.nodeIdRegex.exec('a/b/c'));
(0, assert_1.default)(!id_1.nodeIdRegex.exec('#a'));
(0, assert_1.default)(!!id_1.nodeIdRegex.exec('a/input/c'));
(0, assert_1.default)(!!id_1.nodeIdRegex.exec('a'));
(0, assert_1.default)((0, id_1.isMetadataNodeId)('$/abcdef/description'));
(0, assert_1.default)((0, id_1.isMetadataNodeId)('$/abcdef/input/fdfdrt/data'));
(0, assert_1.default)((0, id_1.isMetadataNodeId)('$/abcdef/input/a + b/type'));
(0, assert_1.default)((0, id_1.isMetadataNodeId)('$/#/auergl/type'));
// assert(!isMetadataNodeId('$/abcdef/input'))
(0, assert_1.default)(!(0, id_1.isMetadataNodeId)('abcdef/data_abcdef'));
(0, assert_1.default)(!(0, id_1.isMetadataNodeId)('abcdef'));
assert_1.default.equal((0, id_1.getPinIdFromLinkPinNodeId)('abc/input/def'), 'def');
assert_1.default.equal((0, id_1.getPinIdFromLinkPinNodeId)('abc/output/def'), 'def');
assert_1.default.equal((0, id_1.isOutputPinId)('abc/output/def'), true);
assert_1.default.equal((0, id_1.isOutputPinId)('abc'), false);
(0, assert_1.default)((0, id_1.isUnitNodeId)('fjjwld'));
(0, assert_1.default)(!(0, id_1.isUnitNodeId)('fjjwld/input/data'));
(0, assert_1.default)(!(0, id_1.isUnitNodeId)('#bcsrew'));
(0, assert_1.default)(!(0, id_1.isUnitNodeId)('%/input/bcsrew'));
(0, assert_1.default)((0, id_1.isMergeNodeId)('@/abcdef'));
(0, assert_1.default)((0, id_1.isMergeNodeId)('@/merge0'));
(0, assert_1.default)(!(0, id_1.isMergeNodeId)('abcdef'));
(0, assert_1.default)(!(0, id_1.isMergeNodeId)('merge0'));
(0, assert_1.default)(!(0, id_1.isMergeNodeId)('%/input/merge0'));
assert_1.default.equal((0, id_1.getExtNodeId)('input', 'abcdef', 'ghijlm'), '%/input/abcdef/ghijlm');
(0, assert_1.default)((0, id_1.isExternalNodeId)('%/input/abcdef'));
(0, assert_1.default)((0, id_1.isExternalNodeId)('%/output/abcdef'));
(0, assert_1.default)((0, id_1.isExternalNodeId)('%/output/[a]'));
(0, assert_1.default)((0, id_1.isExternalNodeId)('%/input/pjcmihkdo'));
(0, assert_1.default)(!(0, id_1.isExternalNodeId)('abcdef'));
(0, assert_1.default)(!(0, id_1.isExternalNodeId)('merge0'));
(0, assert_1.default)(!(0, id_1.isExternalNodeId)('%/input/#/abcdef'));
(0, assert_1.default)((0, id_1.isInternalNodeId)('^/input/abcdef/0'));
(0, assert_1.default)((0, id_1.isInternalNodeId)('^/output/abcdef/0'));
assert_1.default.deepEqual((0, id_1.segmentMetadataId)('?/abcdef/input/a/data'), {
    nodeId: 'abcdef/input/a',
    id: 'data',
});
assert_1.default.deepEqual((0, id_1.segmentMergeNodeId)('@/abcdef'), {
    mergeId: 'abcdef',
});
(0, assert_1.default)((0, id_1.isLinkId)('length_length/output/length'));
assert_1.default.equal((0, id_1.getDatumNodeId)('abcdef'), '#/abcdef');
assert_1.default.equal((0, id_1.isDatumNodeId)('#/abcdef'), true);
assert_1.default.equal((0, id_1.isDatumNodeId)('#/abcdef/input/a'), true);
assert_1.default.equal((0, id_1.isDatumNodeId)('#/if/output/a ? b'), true);
assert_1.default.equal((0, id_1.isDatumNodeId)('abcdef'), false);
assert_1.default.equal((0, id_1.isDatumNodeId)('#/abcdef_abcdef/input/a'), false);
assert_1.default.equal((0, id_1.isDatumNodeId)('#/abcdef_abcdef/input/a'), false);
assert_1.default.equal((0, id_1.getMetadataNodeId)('abcdef', 'description'), '$/abcdef/description');
assert_1.default.deepEqual((0, id_1.segmentDatumNodeId)('#/abcdef/input/a'), {
    datumId: 'abcdef/input/a',
});
(0, assert_1.default)((0, id_1.isLinkPinNodeId)('pugej/output/a + b'));
(0, assert_1.default)((0, id_1.isLinkPinNodeId)('pugej/output/a % b'));
(0, assert_1.default)((0, id_1.isLinkPinNodeId)('pugej/output/a'));
(0, assert_1.default)((0, id_1.isLinkPinNodeId)('pugej/input/a'));
(0, assert_1.default)(!(0, id_1.isLinkPinNodeId)('%/input/a'));
(0, assert_1.default)(!(0, id_1.isLinkPinNodeId)('%/output/a'));
(0, assert_1.default)((0, id_1.isPinNodeId)('pugej/output/a + b'));
(0, assert_1.default)((0, id_1.isPinNodeId)('@/muuja'));
(0, assert_1.default)(!(0, id_1.isPinNodeId)('%/input/a'));
(0, assert_1.default)(!(0, id_1.isPinNodeId)('%/input/a % b'));
assert_1.default.equal((0, id_1.isInputPinId)('wewekd/input/poiguy'), true);
assert_1.default.equal((0, id_1.getPinNodeIdFromPinLinkId)('msvsq_mpvsq/output/a'), 'mpvsq/output/a');
assert_1.default.equal((0, id_1.getUnitIdFromPinLinkId)('msvsq_mpvsq/output/a'), 'msvsq');
assert_1.default.deepEqual((0, id_1.segmentLinkId)('?/mpvsq/output/a/type_mpvsq/output/a'), {
    source: '?/mpvsq/output/a/type',
    target: 'mpvsq/output/a',
});
//# sourceMappingURL=id.js.map