geoiq-frontend-ui-kit
Version:
This project is a UI kit for GeoIQ's frontend. It's built with React, TypeScript, and Vite.
65 lines (64 loc) • 2.29 kB
JavaScript
import e, { useState as s } from "react";
import { MembersSection as y } from "./index.es130.js";
import { ServingStatesSection as h } from "./index.es131.js";
import { TypeSection as u } from "./index.es132.js";
import { SharedMarketsSection as x } from "./index.es133.js";
import { PropertiesAddedSection as b } from "./index.es134.js";
import { CallHistorySection as A } from "./index.es135.js";
import { NotesSection as v } from "./index.es136.js";
import { DialogNote as D } from "./index.es137.js";
const T = (n) => {
const [d, l] = s(!1), [t, i] = s({ type: "note" }), [r, m] = s(""), [a, c] = s({}), p = () => {
i({ type: "note" }), l(!0);
}, S = (o) => {
i({ type: "call", idx: o }), l(!0);
}, g = () => {
t.type === "note" ? (n.onNoteSubmit?.(r), m("")) : t.type === "call" && t.idx !== void 0 && (n.onCallNoteSubmit?.(
t.idx,
a[t.idx] || ""
), c((o) => ({ ...o, [t.idx]: "" }))), l(!1);
}, N = (o) => m(o), f = (o, C) => c((E) => ({ ...E, [o]: C }));
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
H,
{
...n,
onAddNote: p,
onEditCallNote: S
}
), /* @__PURE__ */ e.createElement(
D,
{
open: d,
type: t.type,
idx: t.idx,
callHistory: n.callHistory?.list,
noteValue: r,
callNotes: a,
onNoteChange: N,
onCallNoteChange: f,
onClose: () => l(!1),
onSave: g
}
));
}, H = ({
members: n,
servingStates: d,
types: l,
sharedMarkets: t,
propertiesAdded: i,
callHistory: r,
onEditCallNote: m,
notes: a,
onAddNote: c
}) => /* @__PURE__ */ e.createElement("div", { className: "p-3 bg-light-1 min-w-[420px]" }, /* @__PURE__ */ e.createElement(y, { members: n?.list ?? [] }), /* @__PURE__ */ e.createElement(h, { servingStates: d }), /* @__PURE__ */ e.createElement(u, { types: l }), /* @__PURE__ */ e.createElement(x, { sharedMarkets: t }), /* @__PURE__ */ e.createElement(b, { propertiesAdded: i }), /* @__PURE__ */ e.createElement(
A,
{
callHistory: r?.list ?? [],
onEditCallNote: m
}
), a && /* @__PURE__ */ e.createElement(v, { notes: a?.list ?? [], onAddNote: c }));
export {
H as AgentSnippetComponent,
T as AgentSnippetView
};
//# sourceMappingURL=index.es65.js.map