/**
 * @license Copyright (c) 2017-2025, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */

'use strict';

/**
 * Creates an object with atributes data to be used in template.
 * @param {Object} item
 */
module.exports = item => {
	const attrData = {};

	if ( item.access ) {
		attrData[ `data-${ item.access }` ] = 'true';
	} else {
		attrData[ 'data-public' ] = 'true';
	}

	if ( item.inherited ) {
		attrData[ 'data-inherited' ] = 'true';
	}

	if ( item.mixed ) {
		attrData[ 'data-mixed' ] = 'true';
	}

	if ( item.deprecated ) {
		attrData[ 'data-deprecated' ] = 'true';
	}

	return attrData;
};
