const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
const require_mock = require("../../mock.js");
let react = require("react");
react = require_runtime.__toESM(react);
let _pisell_materials = require("@pisell/materials");
let classnames = require("classnames");
classnames = require_runtime.__toESM(classnames);
require("./index.less");
//#region src/components/eventBooking/components/resourceUsability/index.tsx
const EventResourceUsability = ({ item = (require_mock.mock === null || require_mock.mock === void 0 ? void 0 : require_mock.mock.resource_usability) || {}, showRemaining = true, showTime = true, className, style, onTimeSlotClick }) => {
	const { start_time, end_time, remainingCount, id, disabled, selected } = item;
	return /* @__PURE__ */ react.default.createElement(_pisell_materials.PisellCard, {
		className: (0, classnames.default)("pisell-event-usability", { "pisell-event-usability-selected": selected }, className),
		style,
		borderRadius: 8,
		disabled,
		selected,
		padding: 8
	}, /* @__PURE__ */ react.default.createElement("div", { className: "pisell-event-usability-content" }, /* @__PURE__ */ react.default.createElement("div", {
		className: "pisell-event-usability-slot",
		onClick: () => onTimeSlotClick === null || onTimeSlotClick === void 0 ? void 0 : onTimeSlotClick(id)
	}, showTime && /* @__PURE__ */ react.default.createElement("div", { className: "pisell-event-usability-time" }, start_time, " ", end_time ? /* @__PURE__ */ react.default.createElement("span", null, "~ ", end_time) : ""), showRemaining && /* @__PURE__ */ react.default.createElement("div", { className: "pisell-event-usability-count" }, remainingCount, " Left"))));
};
//#endregion
exports.default = EventResourceUsability;
