import { Button as e } from "../../ui/button.js";
import { Tooltip as t, TooltipContent as n, TooltipTrigger as r } from "../../ui/tooltip.js";
import { useWorkbenchLayout as i } from "../../../features/workbench/providers/WorkbenchLayoutProvider.js";
import "../../../features/workbench/index.js";
import "react";
import { jsx as a, jsxs as o } from "react/jsx-runtime";
import { MonitorPlay as s } from "lucide-react";
//#region src/components/ui-widgets/widgets/SandboxRun.tsx
var c = ({ ui: c, disabled: l }) => {
	let { openPreviewWithEnvironment: u, environments: d } = i(), f = c?.slotId, p = f ? d?.find((e) => e.slotId === f) : void 0, m = !!p, h = p?.envName ? `Open ${p.envName}` : "Open Sandbox";
	return /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ a(r, {
		asChild: !0,
		children: /* @__PURE__ */ a(e, {
			type: "button",
			variant: "default",
			size: "icon",
			disabled: l || !m,
			onClick: () => {
				f && u(f);
			},
			children: /* @__PURE__ */ a(s, { className: "h-4 w-4" })
		})
	}), /* @__PURE__ */ a(n, { children: h })] });
};
//#endregion
export { c as SandboxRun };
