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