"use strict";

const React = require("react");

const useTheme = require("../../util/themeable");
const defaultStyle = require("./style.css");
const generateGridItemStyle	 = require("../../util/generate-grid-item-style");

module.exports = function StatusIndicator({ x, y, status, children }) {
	let { withTheme } = useTheme({ control: "statusIndicator", defaultStyle });

	return (
		<div className={withTheme("uilibComponent", "statusIndicator", `status-${status}`)} style={generateGridItemStyle({ x, y })}>
			<div className={withTheme("content")}>
				{children}
			</div>
		</div>
	);
};
