// NOTICE: This file is generated by Rollup. To modify it,
// please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
'use strict';

const typeGuards = require('./typeGuards.cjs');

/**
 * @param {import('postcss').Node} node
 * @returns {boolean}
 */
function isFirstNodeOfRoot(node) {
	if (typeGuards.isRoot(node)) return false;

	const parentNode = node.parent;

	if (!parentNode) {
		return false;
	}

	return typeGuards.isRoot(parentNode) && node === parentNode.first;
}

module.exports = isFirstNodeOfRoot;
