'use strict';

Liferay.Loader.define('frontend-taglib-clay$clay-management-toolbar@2.24.1/lib/validators', ['module', 'exports', 'require', 'frontend-js-metal-web$metal-state'], function (module, exports, require) {
	var define = undefined;
	var global = window;
	{
		Object.defineProperty(exports, "__esModule", {
			value: true
		});
		exports.filterLabelsValidator = exports.filterItemsValidator = exports.creationMenuItemsValidator = exports.actionItemsValidator = undefined;

		var _metalState = require('frontend-js-metal-web$metal-state');

		var actionItemShape = {
			disabled: _metalState.Config.bool().value(false),
			href: _metalState.Config.string().required(),
			icon: _metalState.Config.string(),
			id: _metalState.Config.string(),
			label: _metalState.Config.string().required(),
			quickAction: _metalState.Config.bool(),
			separator: _metalState.Config.bool().value(false),
			title: _metalState.Config.string(),
			type: _metalState.Config.oneOf(['group', 'item']).value('item')
		};

		var actionItemsValidator = _metalState.Config.arrayOf(_metalState.Config.shapeOf(actionItemShape)).value([]);

		actionItemShape.items = actionItemsValidator;

		var creationMenuItem = {
			disabled: _metalState.Config.bool().value(false),
			href: _metalState.Config.string().required(),
			icon: _metalState.Config.string(),
			label: _metalState.Config.string().required(),
			separator: _metalState.Config.bool().value(false),
			title: _metalState.Config.string()
		};

		var creationMenuItemsValidator = _metalState.Config.arrayOf(_metalState.Config.shapeOf(creationMenuItem));

		creationMenuItem.items = creationMenuItemsValidator;

		var filterItemShape = {
			active: _metalState.Config.bool().value(false),
			checked: _metalState.Config.bool().value(false),
			disabled: _metalState.Config.bool().value(false),
			href: _metalState.Config.string(),
			id: _metalState.Config.string(),
			inputName: _metalState.Config.string(),
			inputValue: _metalState.Config.string(),
			label: _metalState.Config.string().required(),
			separator: _metalState.Config.bool().value(false),
			title: _metalState.Config.string(),
			type: _metalState.Config.oneOf(['checkbox', 'group', 'item', 'radiogroup'])
		};

		var filterItemsValidator = _metalState.Config.arrayOf(_metalState.Config.shapeOf(filterItemShape));

		filterItemShape.items = filterItemsValidator;

		var filterLabelsValidator = _metalState.Config.arrayOf(_metalState.Config.shapeOf({
			closeable: _metalState.Config.bool().value(true),
			data: _metalState.Config.object(),
			label: _metalState.Config.any().required()
		}));

		exports.actionItemsValidator = actionItemsValidator;
		exports.creationMenuItemsValidator = creationMenuItemsValidator;
		exports.filterItemsValidator = filterItemsValidator;
		exports.filterLabelsValidator = filterLabelsValidator;
		//# sourceMappingURL=validators.js.map
	}
});
//# sourceMappingURL=validators.js.map