/*!
 * V4Fire Client Core
 * https://github.com/V4Fire/Client
 *
 * Released under the MIT license
 * https://github.com/V4Fire/Client/blob/master/LICENSE
 */

@import "super/i-data/i-data.styl"
@import "traits/i-access/i-access.styl"
@import "traits/i-visible/i-visible.styl"

$p = {
	accessHelpers: false
	visibleHelpers: false
	messageHelpers: false
}

i-input extends i-data
	// @stlint-disable
	i-access({helpers: $p.accessHelpers})
	i-visible({helpers: $p.visibleHelpers})
	// @stlint-enable

	&__hidden-input
		position absolute
		zIndex(underall)

		width 0
		padding 0
		opacity 0

	if $p.messageHelpers
		&_show-error_true&_valid_true &__error-box
		&_show-info_true&_valid_false &__info-box
		&_show-info_true&_empty_false &__info-box
			display none

		&_show-error_true&_valid_true&_empty_true &__info-box
			display block

	if $p.messageHelpers
		&_show-error_true &__info-box
			display none
