import { j as jsxRuntimeExports, t as twMerge, r as reactExports, a5 as locationInfoByLocation, C as Controller, b as ConnectSelect, a6 as sharingTypeOptions } from "./index-DEuI3Aoa.js";
function Divider(props) {
  return jsxRuntimeExports.jsx("div", { ...props, className: twMerge("h-px bg-gray-200", props.className) });
}
const AvailableOfflineToggle = reactExports.forwardRef(function AvailableOfflineToggle2(props, ref) {
  return jsxRuntimeExports.jsxs("div", { className: "flex items-center rounded-md border border-gray-200 bg-gray-50 p-3 text-gray-900", children: [jsxRuntimeExports.jsxs("div", { className: "flex-1", children: [jsxRuntimeExports.jsx("label", { className: "font-medium text-gray-900", htmlFor: "availableOffline", children: "Make available offline" }), jsxRuntimeExports.jsxs("p", { className: "text-xs text-gray-600", children: ["Check this options if you keep a local backup", jsxRuntimeExports.jsx("br", {}), "available at all times."] })] }), jsxRuntimeExports.jsx(Toggle, { id: "availableOffline", ref, ...props })] });
});
function Label(props) {
  const { children, className, ...labelProps } = props;
  return jsxRuntimeExports.jsx("label", { ...labelProps, className: twMerge("block font-semibold text-gray-500", className), children });
}
function LocationInfo(props) {
  const { location, className, ...divProps } = props;
  const locationInfo = locationInfoByLocation[location];
  return jsxRuntimeExports.jsxs("div", { ...divProps, className: twMerge("my-3 flex items-center gap-2 rounded-xl border border-gray-100 p-3 text-gray-800 shadow", className), children: [locationInfo.icon, jsxRuntimeExports.jsxs("div", { children: [jsxRuntimeExports.jsx("p", { children: locationInfo.title }), jsxRuntimeExports.jsx("p", { className: "text-xs text-slate-200", children: locationInfo.description })] })] });
}
function SharingTypeFormInput(props) {
  const { control, ...delegatedProps } = props;
  return jsxRuntimeExports.jsx(Controller, { control, name: "sharingType", render: ({ field }) => jsxRuntimeExports.jsx(ConnectSelect, { ...delegatedProps, ...field, id: "sharingType", items: sharingTypeOptions }) });
}
const Toggle = reactExports.forwardRef(function Toggle2(props, ref) {
  return jsxRuntimeExports.jsxs("label", { className: "relative cursor-pointer items-center", htmlFor: props.id, children: [jsxRuntimeExports.jsx("input", { className: "peer sr-only", ref, type: "checkbox", value: "", ...props }), jsxRuntimeExports.jsx("div", { className: "peer h-6 w-11 rounded-full bg-gray-500 after:absolute after:start-0.5 after:top-0.5 after:size-5 after:rounded-full after:border after:border-none after:bg-gray-50 after:transition-all peer-checked:bg-blue-900 peer-checked:after:translate-x-full peer-focus:outline-none" })] });
});
export {
  AvailableOfflineToggle as A,
  Divider as D,
  Label as L,
  SharingTypeFormInput as S,
  LocationInfo as a
};
//# sourceMappingURL=toggle-OA2woAUh.js.map
