fui-fancyui
Version:
FancyUI Libary
68 lines (67 loc) • 1.74 kB
JavaScript
"use client";
import { jsxs as O, jsx as t } from "react/jsx-runtime";
import s from "../../atoms/DateOutput/DateOutput.js";
import k from "../../atoms/FancyLine/FancyLine.js";
import { StyledDateOutputFromTo as v, VRWrapper as D } from "./DateOutputFromTo.style.js";
import F from "../../../utils/functions/clampLayer/clampLayer.js";
function w(f) {
var a, d, m, p;
const {
dateFrom: h,
dateTo: u,
handleFromTo: r,
whichIsSelecting: o,
themeType: i = "primary",
layer: c = 3,
textCustom: e,
sizeC: l,
...y
} = f, n = (S) => {
r == null || r(S);
};
return /* @__PURE__ */ O(v, { ...y, children: [
/* @__PURE__ */ t(
s,
{
sizeC: l,
themeType: i,
layer: c,
textCustom: {
selected: ((a = e == null ? void 0 : e.from) == null ? void 0 : a.selected) ?? "From:",
notSelected: (d = e == null ? void 0 : e.from) == null ? void 0 : d.notSelected
},
date: h,
isActive: o === "from" || o === void 0,
onClick: () => n("from")
}
),
/* @__PURE__ */ t(D, { children: /* @__PURE__ */ t(
k,
{
direction: "vertical",
themeType: i,
layer: F(c - 2),
thickness: "2px",
margin: "xs"
}
) }),
/* @__PURE__ */ t(
s,
{
sizeC: l,
themeType: i,
textCustom: {
selected: ((m = e == null ? void 0 : e.to) == null ? void 0 : m.selected) ?? "To:",
notSelected: (p = e == null ? void 0 : e.to) == null ? void 0 : p.notSelected
},
layer: c,
date: u,
isActive: o === "to",
onClick: () => n("to")
}
)
] });
}
export {
w as default
};