PageSourceSearch

https://epsmasdash-ms8uwkec.manus.space/assets/PolicyChangeForm-DKAai6vd.js

js epsmasdash-ms8uwkec.manus.space collected 2026-10-03 05:02:07 UTC 127,140 bytes, 2,113 lines download raw bytes

vendor: 3,418 bytes, lines 1-80
1import { c as createLucideIcon, r as reactExports, G as useDirection, H as useControllableState, j as jsxRuntimeExports, w as createContextScope, y as Primitive, A as useComposedRefs, z as composeEventHandlers, af as Presence, aF as useSize, V as cn, aY as useParams, u as useLocation, t as trpc, b as toast, F as FileText, a1 as ShieldCheck, g as ChevronRight, ae as ChevronLeft, B as Button, L as LoaderCircle, M as Mail } from './index-CNT5CkK7.js';
2import { I as Input } from './input-Dy4-W9m0.js';
3import { L as Label } from './label-BdZn6Q6n.js';
4import { T as Textarea } from './textarea-B3UNOK9R.js';
5import { S as Select, a as SelectTrigger, b as SelectValue, c as SelectContent, d as SelectItem } from './select-3x7TRCw-.js';
6import { c as createRovingFocusGroupScope, R as Root, I as Item } from './index-D1Fi90JZ.js';
7import { u as usePrevious } from './index-B88B3rZe.js';
8import { D as DatePicker } from './DatePicker-mymcOl0Q.js';
9import { C as Check } from './check-BezXvNsL.js';
10import { C as Car } from './car-DSWUF9xe.js';
11import { H as House } from './house-1fQZgX0U.js';
12import { C as CirclePlus } from './circle-plus-By14nPvx.js';
13import { H as Heart } from './heart-JRsWOGao.js';
14import { B as Briefcase } from './briefcase-d8WvXAbR.js';
15import { C as CircleCheck } from './circle-check-CqW-unub.js';
16import { U as User } from './user-B4RG8T6t.js';
17import { C as CircleX } from './circle-x-Bp9RgmBn.js';
18import { T as Trash2 } from './trash-2-DkCMhEWr.js';
19import { P as Plus } from './plus-BP2QxMPQ.js';
20import { P as Phone } from './phone-BYCO7cEE.js';
21import './useComposition-DPCJbBnn.js';
22import './index-BEBgmBqK.js';
23import './chevron-down-DFKrqu4j.js';
24import './chevron-up-Do8Lk9oa.js';
25import './calendar-CGh5WTcU.js';
26
27/**
28 * @license lucide-react v0.453.0 - ISC
29 *
30 * This source code is licensed under the ISC license.
31 * See the LICENSE file in the root directory of this source tree.
32 */
33
34
35const Circle = createLucideIcon("Circle", [
36  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
37]);
38
39/**
40 * @license lucide-react v0.453.0 - ISC
41 *
42 * This source code is licensed under the ISC license.
43 * See the LICENSE file in the root directory of this source tree.
44 */
45
46
47const ImageUp = createLucideIcon("ImageUp", [
48  [
49    "path",
50    {
51      d: "M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21",
52      key: "9csbqa"
53    }
54  ],
55  ["path", { d: "m14 19.5 3-3 3 3", key: "9vmjn0" }],
56  ["path", { d: "M17 22v-5.5", key: "1aa6fl" }],
57  ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }]
58]);
59
60var RADIO_NAME = "Radio";
61var [createRadioContext, createRadioScope] = createContextScope(RADIO_NAME);
62var [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME);
63var Radio = reactExports.forwardRef(
64  (props, forwardedRef) => {
65    const {
66      __scopeRadio,
67      name,
68      checked = false,
69      required,
70      disabled,
71      value = "on",
72      onCheck,
73      form,
74      ...radioProps
75    } = props;
76    const [button, setButton] = reactExports.useState(null);
77    const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));
78    const hasConsumerStoppedPropagationRef = reactExports.useRef(false);
79    const isFormControl = button ? form || !!button.closest("form") : true;
80    return /* @__PURE__ */ jsxRuntimeExports.jsxs(RadioProvider, { scope: __scopeRadio, checked, disabled, children: [
vendor: 18,236 bytes, lines 81-650
81      /* @__PURE__ */ jsxRuntimeExports.jsx(
82        Primitive.button,
83        {
84          type: "button",
85          role: "radio",
86          "aria-checked": checked,
87          "data-state": getState$1(checked),
88          "data-disabled": disabled ? "" : void 0,
89          disabled,
90          value,
91          ...radioProps,
92          ref: composedRefs,
93          onClick: composeEventHandlers(props.onClick, (event) => {
94            if (!checked) onCheck?.();
95            if (isFormControl) {
96              hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
97              if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
98            }
99          })
100        }
101      ),
102      isFormControl && /* @__PURE__ */ jsxRuntimeExports.jsx(
103        RadioBubbleInput,
104        {
105          control: button,
106          bubbles: !hasConsumerStoppedPropagationRef.current,
107          name,
108          value,
109          checked,
110          required,
111          disabled,
112          form,
113          style: { transform: "translateX(-100%)" }
114        }
115      )
116    ] });
117  }
118);
119Radio.displayName = RADIO_NAME;
120var INDICATOR_NAME$1 = "RadioIndicator";
121var RadioIndicator = reactExports.forwardRef(
122  (props, forwardedRef) => {
123    const { __scopeRadio, forceMount, ...indicatorProps } = props;
124    const context = useRadioContext(INDICATOR_NAME$1, __scopeRadio);
125    return /* @__PURE__ */ jsxRuntimeExports.jsx(Presence, { present: forceMount || context.checked, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
126      Primitive.span,
127      {
128        "data-state": getState$1(context.checked),
129        "data-disabled": context.disabled ? "" : void 0,
130        ...indicatorProps,
131        ref: forwardedRef
132      }
133    ) });
134  }
135);
136RadioIndicator.displayName = INDICATOR_NAME$1;
137var BUBBLE_INPUT_NAME$1 = "RadioBubbleInput";
138var RadioBubbleInput = reactExports.forwardRef(
139  ({
140    __scopeRadio,
141    control,
142    checked,
143    bubbles = true,
144    ...props
145  }, forwardedRef) => {
146    const ref = reactExports.useRef(null);
147    const composedRefs = useComposedRefs(ref, forwardedRef);
148    const prevChecked = usePrevious(checked);
149    const controlSize = useSize(control);
150    reactExports.useEffect(() => {
151      const input = ref.current;
152      if (!input) return;
153      const inputProto = window.HTMLInputElement.prototype;
154      const descriptor = Object.getOwnPropertyDescriptor(
155        inputProto,
156        "checked"
157      );
158      const setChecked = descriptor.set;
159      if (prevChecked !== checked && setChecked) {
160        const event = new Event("click", { bubbles });
161        setChecked.call(input, checked);
162        input.dispatchEvent(event);
163      }
164    }, [prevChecked, checked, bubbles]);
165    return /* @__PURE__ */ jsxRuntimeExports.jsx(
166      Primitive.input,
167      {
168        type: "radio",
169        "aria-hidden": true,
170        defaultChecked: checked,
171        ...props,
172        tabIndex: -1,
173        ref: composedRefs,
174        style: {
175          ...props.style,
176          ...controlSize,
177          position: "absolute",
178          pointerEvents: "none",
179          opacity: 0,
180          margin: 0
181        }
182      }
183    );
184  }
185);
186RadioBubbleInput.displayName = BUBBLE_INPUT_NAME$1;
187function getState$1(checked) {
188  return checked ? "checked" : "unchecked";
189}
190var ARROW_KEYS = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
191var RADIO_GROUP_NAME = "RadioGroup";
192var [createRadioGroupContext] = createContextScope(RADIO_GROUP_NAME, [
193  createRovingFocusGroupScope,
194  createRadioScope
195]);
196var useRovingFocusGroupScope = createRovingFocusGroupScope();
197var useRadioScope = createRadioScope();
198var [RadioGroupProvider, useRadioGroupContext] = createRadioGroupContext(RADIO_GROUP_NAME);
199var RadioGroup$1 = reactExports.forwardRef(
200  (props, forwardedRef) => {
201    const {
202      __scopeRadioGroup,
203      name,
204      defaultValue,
205      value: valueProp,
206      required = false,
207      disabled = false,
208      orientation,
209      dir,
210      loop = true,
211      onValueChange,
212      ...groupProps
213    } = props;
214    const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);
215    const direction = useDirection(dir);
216    const [value, setValue] = useControllableState({
217      prop: valueProp,
218      defaultProp: defaultValue ?? null,
219      onChange: onValueChange,
220      caller: RADIO_GROUP_NAME
221    });
222    return /* @__PURE__ */ jsxRuntimeExports.jsx(
223      RadioGroupProvider,
224      {
225        scope: __scopeRadioGroup,
226        name,
227        required,
228        disabled,
229        value,
230        onValueChange: setValue,
231        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
232          Root,
233          {
234            asChild: true,
235            ...rovingFocusGroupScope,
236            orientation,
237            dir: direction,
238            loop,
239            children: /* @__PURE__ */ jsxRuntimeExports.jsx(
240              Primitive.div,
241              {
242                role: "radiogroup",
243                "aria-required": required,
244                "aria-orientation": orientation,
245                "data-disabled": disabled ? "" : void 0,
246                dir: direction,
247                ...groupProps,
248                ref: forwardedRef
249              }
250            )
251          }
252        )
253      }
254    );
255  }
256);
257RadioGroup$1.displayName = RADIO_GROUP_NAME;
258var ITEM_NAME = "RadioGroupItem";
259var RadioGroupItem$1 = reactExports.forwardRef(
260  (props, forwardedRef) => {
261    const { __scopeRadioGroup, disabled, ...itemProps } = props;
262    const context = useRadioGroupContext(ITEM_NAME, __scopeRadioGroup);
263    const isDisabled = context.disabled || disabled;
264    const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);
265    const radioScope = useRadioScope(__scopeRadioGroup);
266    const ref = reactExports.useRef(null);
267    const composedRefs = useComposedRefs(forwardedRef, ref);
268    const checked = context.value === itemProps.value;
269    const isArrowKeyPressedRef = reactExports.useRef(false);
270    reactExports.useEffect(() => {
271      const handleKeyDown = (event) => {
272        if (ARROW_KEYS.includes(event.key)) {
273          isArrowKeyPressedRef.current = true;
274        }
275      };
276      const handleKeyUp = () => isArrowKeyPressedRef.current = false;
277      document.addEventListener("keydown", handleKeyDown);
278      document.addEventListener("keyup", handleKeyUp);
279      return () => {
280        document.removeEventListener("keydown", handleKeyDown);
281        document.removeEventListener("keyup", handleKeyUp);
282      };
283    }, []);
284    return /* @__PURE__ */ jsxRuntimeExports.jsx(
285      Item,
286      {
287        asChild: true,
288        ...rovingFocusGroupScope,
289        focusable: !isDisabled,
290        active: checked,
291        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
292          Radio,
293          {
294            disabled: isDisabled,
295            required: context.required,
296            checked,
297            ...radioScope,
298            ...itemProps,
299            name: context.name,
300            ref: composedRefs,
301            onCheck: () => context.onValueChange(itemProps.value),
302            onKeyDown: composeEventHandlers((event) => {
303              if (event.key === "Enter") event.preventDefault();
304            }),
305            onFocus: composeEventHandlers(itemProps.onFocus, () => {
306              if (isArrowKeyPressedRef.current) ref.current?.click();
307            })
308          }
309        )
310      }
311    );
312  }
313);
314RadioGroupItem$1.displayName = ITEM_NAME;
315var INDICATOR_NAME2 = "RadioGroupIndicator";
316var RadioGroupIndicator = reactExports.forwardRef(
317  (props, forwardedRef) => {
318    const { __scopeRadioGroup, ...indicatorProps } = props;
319    const radioScope = useRadioScope(__scopeRadioGroup);
320    return /* @__PURE__ */ jsxRuntimeExports.jsx(RadioIndicator, { ...radioScope, ...indicatorProps, ref: forwardedRef });
321  }
322);
323RadioGroupIndicator.displayName = INDICATOR_NAME2;
324var Root2 = RadioGroup$1;
325var Item2 = RadioGroupItem$1;
326var Indicator = RadioGroupIndicator;
327
328function RadioGroup({
329  className,
330  ...props
331}) {
332  return /* @__PURE__ */ jsxRuntimeExports.jsx(
333    Root2,
334    {
335      "data-slot": "radio-group",
336      className: cn("grid gap-3", className),
337      ...props
338    }
339  );
340}
341function RadioGroupItem({
342  className,
343  ...props
344}) {
345  return /* @__PURE__ */ jsxRuntimeExports.jsx(
346    Item2,
347    {
348      "data-slot": "radio-group-item",
349      className: cn(
350        "border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
351        className
352      ),
353      ...props,
354      children: /* @__PURE__ */ jsxRuntimeExports.jsx(
355        Indicator,
356        {
357          "data-slot": "radio-group-indicator",
358          className: "relative flex items-center justify-center",
359          children: /* @__PURE__ */ jsxRuntimeExports.jsx(Circle, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
360        }
361      )
362    }
363  );
364}
365
366var CHECKBOX_NAME = "Checkbox";
367var [createCheckboxContext] = createContextScope(CHECKBOX_NAME);
368var [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
369function CheckboxProvider(props) {
370  const {
371    __scopeCheckbox,
372    checked: checkedProp,
373    children,
374    defaultChecked,
375    disabled,
376    form,
377    name,
378    onCheckedChange,
379    required,
380    value = "on",
381    // @ts-expect-error
382    internal_do_not_use_render
383  } = props;
384  const [checked, setChecked] = useControllableState({
385    prop: checkedProp,
386    defaultProp: defaultChecked ?? false,
387    onChange: onCheckedChange,
388    caller: CHECKBOX_NAME
389  });
390  const [control, setControl] = reactExports.useState(null);
391  const [bubbleInput, setBubbleInput] = reactExports.useState(null);
392  const hasConsumerStoppedPropagationRef = reactExports.useRef(false);
393  const isFormControl = control ? !!form || !!control.closest("form") : (
394    // We set this to true by default so that events bubble to forms without JS (SSR)
395    true
396  );
397  const context = {
398    checked,
399    disabled,
400    setChecked,
401    control,
402    setControl,
403    name,
404    form,
405    value,
406    hasConsumerStoppedPropagationRef,
407    required,
408    defaultChecked: isIndeterminate(defaultChecked) ? false : defaultChecked,
409    isFormControl,
410    bubbleInput,
411    setBubbleInput
412  };
413  return /* @__PURE__ */ jsxRuntimeExports.jsx(
414    CheckboxProviderImpl,
415    {
416      scope: __scopeCheckbox,
417      ...context,
418      children: isFunction(internal_do_not_use_render) ? internal_do_not_use_render(context) : children
419    }
420  );
421}
422var TRIGGER_NAME = "CheckboxTrigger";
423var CheckboxTrigger = reactExports.forwardRef(
424  ({ __scopeCheckbox, onKeyDown, onClick, ...checkboxProps }, forwardedRef) => {
425    const {
426      control,
427      value,
428      disabled,
429      checked,
430      required,
431      setControl,
432      setChecked,
433      hasConsumerStoppedPropagationRef,
434      isFormControl,
435      bubbleInput
436    } = useCheckboxContext(TRIGGER_NAME, __scopeCheckbox);
437    const composedRefs = useComposedRefs(forwardedRef, setControl);
438    const initialCheckedStateRef = reactExports.useRef(checked);
439    reactExports.useEffect(() => {
440      const form = control?.form;
441      if (form) {
442        const reset = () => setChecked(initialCheckedStateRef.current);
443        form.addEventListener("reset", reset);
444        return () => form.removeEventListener("reset", reset);
445      }
446    }, [control, setChecked]);
447    return /* @__PURE__ */ jsxRuntimeExports.jsx(
448      Primitive.button,
449      {
450        type: "button",
451        role: "checkbox",
452        "aria-checked": isIndeterminate(checked) ? "mixed" : checked,
453        "aria-required": required,
454        "data-state": getState(checked),
455        "data-disabled": disabled ? "" : void 0,
456        disabled,
457        value,
458        ...checkboxProps,
459        ref: composedRefs,
460        onKeyDown: composeEventHandlers(onKeyDown, (event) => {
461          if (event.key === "Enter") event.preventDefault();
462        }),
463        onClick: composeEventHandlers(onClick, (event) => {
464          setChecked((prevChecked) => isIndeterminate(prevChecked) ? true : !prevChecked);
465          if (bubbleInput && isFormControl) {
466            hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
467            if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
468          }
469        })
470      }
471    );
472  }
473);
474CheckboxTrigger.displayName = TRIGGER_NAME;
475var Checkbox$1 = reactExports.forwardRef(
476  (props, forwardedRef) => {
477    const {
478      __scopeCheckbox,
479      name,
480      checked,
481      defaultChecked,
482      required,
483      disabled,
484      value,
485      onCheckedChange,
486      form,
487      ...checkboxProps
488    } = props;
489    return /* @__PURE__ */ jsxRuntimeExports.jsx(
490      CheckboxProvider,
491      {
492        __scopeCheckbox,
493        checked,
494        defaultChecked,
495        disabled,
496        required,
497        onCheckedChange,
498        name,
499        form,
500        value,
501        internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
502          /* @__PURE__ */ jsxRuntimeExports.jsx(
503            CheckboxTrigger,
504            {
505              ...checkboxProps,
506              ref: forwardedRef,
507              __scopeCheckbox
508            }
509          ),
510          isFormControl && /* @__PURE__ */ jsxRuntimeExports.jsx(
511            CheckboxBubbleInput,
512            {
513              __scopeCheckbox
514            }
515          )
516        ] })
517      }
518    );
519  }
520);
521Checkbox$1.displayName = CHECKBOX_NAME;
522var INDICATOR_NAME = "CheckboxIndicator";
523var CheckboxIndicator = reactExports.forwardRef(
524  (props, forwardedRef) => {
525    const { __scopeCheckbox, forceMount, ...indicatorProps } = props;
526    const context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox);
527    return /* @__PURE__ */ jsxRuntimeExports.jsx(
528      Presence,
529      {
530        present: forceMount || isIndeterminate(context.checked) || context.checked === true,
531        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
532          Primitive.span,
533          {
534            "data-state": getState(context.checked),
535            "data-disabled": context.disabled ? "" : void 0,
536            ...indicatorProps,
537            ref: forwardedRef,
538            style: { pointerEvents: "none", ...props.style }
539          }
540        )
541      }
542    );
543  }
544);
545CheckboxIndicator.displayName = INDICATOR_NAME;
546var BUBBLE_INPUT_NAME = "CheckboxBubbleInput";
547var CheckboxBubbleInput = reactExports.forwardRef(
548  ({ __scopeCheckbox, ...props }, forwardedRef) => {
549    const {
550      control,
551      hasConsumerStoppedPropagationRef,
552      checked,
553      defaultChecked,
554      required,
555      disabled,
556      name,
557      value,
558      form,
559      bubbleInput,
560      setBubbleInput
561    } = useCheckboxContext(BUBBLE_INPUT_NAME, __scopeCheckbox);
562    const composedRefs = useComposedRefs(forwardedRef, setBubbleInput);
563    const prevChecked = usePrevious(checked);
564    const controlSize = useSize(control);
565    reactExports.useEffect(() => {
566      const input = bubbleInput;
567      if (!input) return;
568      const inputProto = window.HTMLInputElement.prototype;
569      const descriptor = Object.getOwnPropertyDescriptor(
570        inputProto,
571        "checked"
572      );
573      const setChecked = descriptor.set;
574      const bubbles = !hasConsumerStoppedPropagationRef.current;
575      if (prevChecked !== checked && setChecked) {
576        const event = new Event("click", { bubbles });
577        input.indeterminate = isIndeterminate(checked);
578        setChecked.call(input, isIndeterminate(checked) ? false : checked);
579        input.dispatchEvent(event);
580      }
581    }, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);
582    const defaultCheckedRef = reactExports.useRef(isIndeterminate(checked) ? false : checked);
583    return /* @__PURE__ */ jsxRuntimeExports.jsx(
584      Primitive.input,
585      {
586        type: "checkbox",
587        "aria-hidden": true,
588        defaultChecked: defaultChecked ?? defaultCheckedRef.current,
589        required,
590        disabled,
591        name,
592        value,
593        form,
594        ...props,
595        tabIndex: -1,
596        ref: composedRefs,
597        style: {
598          ...props.style,
599          ...controlSize,
600          position: "absolute",
601          pointerEvents: "none",
602          opacity: 0,
603          margin: 0,
604          // We transform because the input is absolutely positioned but we have
605          // rendered it **after** the button. This pulls it back to sit on top
606          // of the button.
607          transform: "translateX(-100%)"
608        }
609      }
610    );
611  }
612);
613CheckboxBubbleInput.displayName = BUBBLE_INPUT_NAME;
614function isFunction(value) {
615  return typeof value === "function";
616}
617function isIndeterminate(checked) {
618  return checked === "indeterminate";
619}
620function getState(checked) {
621  return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
622}
623
624function Checkbox({
625  className,
626  ...props
627}) {
628  return /* @__PURE__ */ jsxRuntimeExports.jsx(
629    Checkbox$1,
630    {
631      "data-slot": "checkbox",
632      className: cn(
633        "peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
634        className
635      ),
636      ...props,
637      children: /* @__PURE__ */ jsxRuntimeExports.jsx(
638        CheckboxIndicator,
639        {
640          "data-slot": "checkbox-indicator",
641          className: "flex items-center justify-center text-current transition-none",
642          children: /* @__PURE__ */ jsxRuntimeExports.jsx(Check, { className: "size-3.5" })
643        }
644      )
645    }
646  );
647}
648
649const CAMPER_TRAVEL_TRAILER_CHANGE_TYPES = [
650  "add_camper_travel_trailer",
651  "quote_camper"
652];
653function requiresCamperTravelTrailerValue(changeType) {
654  return CAMPER_TRAVEL_TRAILER_CHANGE_TYPES.includes(changeType);
655}
656function normalizeCamperTravelTrailerValue(value) {
657  if (typeof value !== "string" && typeof value !== "number") return null;
658  const raw = String(value).trim();
659  if (!raw) return null;
660  const normalized = raw.replace(/[$,\s]/g, "");
661  if (!/^\d+(?:\.\d{1,2})?$/.test(normalized)) return null;
662  const amount = Number(normalized);
663  if (!Number.isFinite(amount) || amount <= 0) return null;
664  return amount.toLocaleString("en-US", {
665    style: "currency",
666    currency: "USD",
667    minimumFractionDigits: 2,
668    maximumFractionDigits: 2
669  });
670}
671function validateCamperTravelTrailerValue(changeType, details) {
672  if (!requiresCamperTravelTrailerValue(changeType)) return { valid: true };
673  const normalizedValue = normalizeCamperTravelTrailerValue(details.camperValue);
674  if (!normalizedValue) {
675    return {
676      valid: false,
677      message: "Please enter the camper or travel trailer value as a dollar amount greater than $0."
678    };
679  }
680  return { valid: true, normalizedValue };
681}
682
683const US_STATES = [
684  "AL",
685  "AK",
686  "AZ",
687  "AR",
688  "CA",
689  "CO",
690  "CT",
691  "DE",
692  "FL",
693  "GA",
694  "HI",
695  "ID",
696  "IL",
697  "IN",
698  "IA",
699  "KS",
700  "KY",
701  "LA",
702  "ME",
703  "MD",
704  "MA",
705  "MI",
706  "MN",
707  "MS",
708  "MO",
709  "MT",
710  "NE",
711  "NV",
712  "NH",
713  "NJ",
714  "NM",
715  "NY",
716  "NC",
717  "ND",
718  "OH",
719  "OK",
720  "OR",
721  "PA",
722  "RI",
723  "SC",
724  "SD",
725  "TN",
726  "TX",
727  "UT",
728  "VT",
729  "VA",
730  "WA",
731  "WV",
732  "WI",
733  "WY",
734  "DC"
735];
736const CATEGORIES = [
737  {
738    id: "auto",
739    label: "Auto Insurance",
740    icon: Car,
741    description: "Add or remove a vehicle or driver, update coverage",
742    color: "bg-blue-50 border-blue-200 hover:border-blue-400",
743    activeColor: "bg-blue-100 border-blue-500",
744    iconColor: "text-blue-600",
745    changeTypes: [
746      { id: "add_vehicle", label: "Add a Vehicle" },
747      { id: "add_camper_travel_trailer", label: "Add a Camper / Travel Trailer" },
748      { id: "add_motorcycle", label: "Add a Motorcycle" },
749      { id: "remove_vehicle", label: "Remove a Vehicle" },
750      { id: "replace_vehicle", label: "Replace a Vehicle (Trade-In)" },
751      { id: "add_driver", label: "Add a Driver" },
752      { id: "remove_driver", label: "Remove a Driver" },
753      { id: "change_address", label: "Update Address" },
754      { id: "lienholder_change", label: "Add / Change Lienholder or Lessor" },
755      { id: "other_auto", label: "Other Auto Change" }
756    ]
757  },
758  {
759    id: "home",
760    label: "Home & Property",
761    icon: House,
762    description: "Update your home, renters, or property policy",
763    color: "bg-green-50 border-green-200 hover:border-green-400",
764    activeColor: "bg-green-100 border-green-500",
765    iconColor: "text-green-600",
766    changeTypes: [
767      { id: "add_property", label: "Add a Property" },
768      { id: "remove_property", label: "Remove a Property" },
769      { id: "change_coverage_home", label: "Change Coverage" },
770      { id: "mortgage_change", label: "Add / Change Mortgage Company" },
771      { id: "other_home", label: "Other Home / Property Change" }
772    ]
773  },
774  {
775    id: "new_coverage",
776    label: "New Coverage Quote",
777    icon: CirclePlus,
778    description: "Request a quote for a new policy or coverage",
779    color: "bg-purple-50 border-purple-200 hover:border-purple-400",
780    activeColor: "bg-purple-100 border-purple-500",
781    iconColor: "text-purple-600",
782    changeTypes: [
783      { id: "quote_auto", label: "Auto Insurance Quote" },
784      { id: "quote_home", label: "Home / Renters Quote" },
785      { id: "quote_motorhome", label: "Motorhome / RV Quote" },
786      { id: "quote_camper", label: "Camper / Travel Trailer Quote" },
787      { id: "quote_motorcycle", label: "Motorcycle Quote" },
788      { id: "quote_boat", label: "Boat / Watercraft Quote" },
789      { id: "quote_atv", label: "ATV / Off-Road Vehicle Quote" },
790      { id: "quote_life", label: "Life Insurance Quote" },
791      { id: "quote_commercial", label: "Commercial / Business Quote" },
792      { id: "quote_umbrella", label: "Umbrella / Excess Liability Quote" },
793      { id: "quote_other", label: "Other Coverage Quote" }
794    ]
795  },
796  {
797    id: "life_insurance",
798    label: "Life Insurance",
799    icon: Heart,
800    description: "Update beneficiaries, coverage, or policy details",
801    color: "bg-rose-50 border-rose-200 hover:border-rose-400",
802    activeColor: "bg-rose-100 border-rose-500",
803    iconColor: "text-rose-600",
804    changeTypes: [
805      { id: "change_beneficiary", label: "Change Beneficiary" },
806      { id: "change_coverage_life", label: "Change Coverage Amou
806nt" },
807      { id: "address_change_life", label: "Update Address" },
808      { id: "other_life", label: "Other Life Insurance Change" }
809    ]
810  },
811  {
812    id: "commercial",
813    label: "Commercial / Business",
814    icon: Briefcase,
815    description: "Update your business or commercial policy",
816    color: "bg-amber-50 border-amber-200 hover:border-amber-400",
817    activeColor: "bg-amber-100 border-amber-500",
818    iconColor: "text-amber-600",
819    changeTypes: [
820      { id: "add_location", label: "Add a Business Location" },
821      { id: "remove_location", label: "Remove a Business Location" },
822      { id: "add_vehicle_commercial", label: "Add a Commercial Vehicle" },
823      { id: "remove_vehicle_commercial", label: "Remove a Commercial Vehicle" },
824      { id: "change_coverage_commercial", label: "Change Coverage" },
825      { id: "add_employee", label: "Add / Update Employee Information" },
826      { id: "other_commercial", label: "Other Commercial Change" }
827    ]
828  },
829  {
830    id: "general",
831    label: "General / Administrative",
832    icon: FileText,
833    description: "Name change, billing, cancellation, or other requests",
834    color: "bg-slate-50 border-slate-200 hover:border-slate-400",
835    activeColor: "bg-slate-100 border-slate-500",
836    iconColor: "text-slate-600",
837    changeTypes: [
838      { id: "name_change", label: "Name Change" },
839      { id: "billing_change", label: "Billing / Payment Method Change" },
840      { id: "cancel_policy", label: "Cancel a Policy" },
841      { id: "request_id_card", label: "Request ID Cards or Documents" },
842      { id: "other_general", label: "Other Request" }
843    ]
844  }
845];
846function ChangeTypeFields({
847  changeType,
848  values,
849  onChange
850}) {
851  const field = (key, label, type = "text", opts) => {
852    const req = opts?.required !== false;
853    if (type === "date") {
854      const isAsap = values[key] === "ASAP";
855      const rawVal = values[key] ?? "";
856      let isoVal = "";
857      if (!isAsap && rawVal) {
858        const mmddyyyy = rawVal.match(/^(\d{2})\/(\d{2})\/(\d{4})$/);
859        isoVal = mmddyyyy ? `${mmddyyyy[3]}-${mmddyyyy[1]}-${mmddyyyy[2]}` : rawVal;
860      }
861      return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1.5", children: [
862        /* @__PURE__ */ jsxRuntimeExports.jsxs(Label, { className: "text-sm font-medium text-gray-700", children: [
863          label,
864          req && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-red-500 ml-1", children: "*" })
865        ] }),
866        /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2", children: [
867          !isAsap && /* @__PURE__ */ jsxRuntimeExports.jsx(
868            DatePicker,
869            {
870              value: isoVal,
871              onChange: (iso) => {
872                if (iso) {
873                  const [y, m, d] = iso.split("-");
874                  onChange(key, `${m}/${d}/${y}`);
875                } else {
876                  onChange(key, "");
877                }
878              },
879              placeholder: "Select a date"
880            }
881          ),
882          /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
883            /* @__PURE__ */ jsxRuntimeExports.jsx(
884              Checkbox,
885              {
886                id: `${key}-asap`,
887                checked: isAsap,
888                onCheckedChange: (checked) => onChange(key, checked ? "ASAP" : "")
889              }
890            ),
891            /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { htmlFor: `${key}-asap`, className: "text-sm font-normal cursor-pointer text-gray-600", children: "As soon as possible (ASAP)" })
892          ] })
893        ] })
894      ] }, key);
895    }
896    if (type === "textarea") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1.5", children: [
897      /* @__PURE__ */ jsxRuntimeExports.jsxs(Label, { className: "text-sm font-medium text-gray-700", children: [
898        label,
899        req && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-red-500 ml-1", children: "*" })
900      ] }),
901      /* @__PURE__ */ jsxRuntimeExports.jsx(
902        Textarea,
903        {
904          value: values[key] ?? "",
905          onChange: (e) => onChange(key, e.target.value),
906          placeholder: opts?.placeholder,
907          className: "min-h-[80px] text-sm"
908        }
909      )
910    ] }, key);
911    if (type === "select") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1.5", children: [
912      /* @__PURE__ */ jsxRuntimeExports.jsxs(Label, { className: "text-sm font-medium text-gray-700", children: [
913        label,
914        req && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-red-500 ml-1", children: "*" })
915      ] }),
916      /* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { value: values[key] ?? "", onValueChange: (v) => onChange(key, v), children: [
917        /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "text-sm", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, { placeholder: "Select an option" }) }),
918        /* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: opts?.options?.map((o) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: o, children: o }, o)) })
919      ] })
920    ] }, key);
921    if (type === "radio") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1.5", children: [
922      /* @__PURE__ */ jsxRuntimeExports.jsxs(Label, { className: "text-sm font-medium text-gray-700", children: [
923        label,
924        req && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-red-500 ml-1", children: "*" })
925      ] }),
926      /* @__PURE__ */ jsxRuntimeExports.jsx(RadioGroup, { value: values[key] ?? "", onValueChange: (v) => onChange(key, v), className: "flex gap-4", children: opts?.options?.map((o) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2", children: [
927        /* @__PURE__ */ jsxRuntimeExports.jsx(RadioGroupItem, { value: o, id: `${key}-${o}` }),
928        /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { htmlFor: `${key}-${o}`, className: "font-normal cursor-pointer", children: o })
929      ] }, o)) })
930    ] }, key);
931    return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1.5", children: [
932      /* @__PURE__ */ jsxRuntimeExports.jsxs(Label, { className: "text-sm font-medium text-gray-700", children: [
933        label,
934        req && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-red-500 ml-1", children: "*" })
935      ] }),
936      /* @__PURE__ */ jsxRuntimeExports.jsx(
937        Input,
938        {
939          value: values[key] ?? "",
940          onChange: (e) => onChange(key, e.target.value),
941          placeholder: opts?.placeholder,
942          className: "text-sm"
943        }
944      )
945    ] }, key);
946  };
947  if (changeType === "add_vehicle") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
948    field("year", "Vehicle Year", "text", { placeholder: "e.g. 2022" }),
949    field("make", "Make", "text", { placeholder: "e.g. Toyota" }),
950    field("model", "Model", "text", { placeholder: "e.g. Camry" }),
951    field("vin", "VIN", "text", { placeholder: "17-character Vehicle Identification Number" }),
952    field("primaryDriver", "Primary Driver", "text", { placeholder: "Full name" }),
953    field("coverageRequested", "Coverage Requested", "select", { options: ["Liability Only", "Full Coverage", "Same as current policy", "Not sure — please advise"] }),
954    field("replacingVehicle", "Are you replacing an existing vehicle with this one?", "radio", { options: ["Yes", "No"] }),
955    values["replacingVehicle"] === "Yes" && field("vehicleBeingReplaced", "Vehicle Being Replaced (Year / Make / Model)", "text", { placeholder: "e.g. 2018 Ford Explorer" }),
956    field("hasLienholder", "Is there a lienholder or financing company on this vehicle?", "radio", { options: ["Yes", "No"] }),
957    values["hasLienholder"] === "Yes" && field("lienholderName", "Lienholder / Finance Company Name", "text", { placeholder: "e.g. Chase Auto Finance" }),
958    values["hasLienholder"] === "Yes" && field("lienholderAccountNumber", "Account / Loan Number", "text", { placeholder: "e.g. 1234567890", required: false }),
959    field("effectiveDate", "Requested Effective Date", "date")
960  ] });
961  if (changeType === "add_motorcycle") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
962    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-orange-50 border border-orange-200 rounded-lg p-3 text-sm text-orange-800", children: "Please complete all fields below so your agent can add your motorcycle to your policy." }),
963    field("effectiveDate", "Requested Effective Date (OD Date)", "date"),
964    field("vin", "VIN (Vehicle Identification Number)", "text", { placeholder: "17-character VIN" }),
965    field("year", "Year", "text", { placeholder: "e.g. 2023" }),
966    field("make", "Make", "text", { placeholder: "e.g. Harley-Davidson" }),
967    field("model", "Model", "text", { placeholder: "e.g. Sportster S" }),
968    field("engineCC", "How many cc's is the engine?", "text", { placeholder: "e.g. 1250" }),
969    field("daysPerWeek", "How many days per week do you think you will ride?", "select", { options: ["1", "2", "3", "4", "5", "6", "7"] }),
970    field("milesPerYear", "How many miles per year do you estimate riding?", "text", { placeholder: "e.g. 3000" }),
971    field("hasEndorsement", "Do you have a motorcycle endorsement on your license?", "radio", { options: ["Yes", "No"] }),
972    field("completedSafetyCourse", "Have you taken a motorcycle rider safety course?", "radio", { options: ["Yes", "No"] }),
973    field("yearsExperience", "How many years of experience do you have riding a motorcycle?", "select", { options: ["Less than 1 year", "1 year", "2 years", "3 years", "4 years", "5 years", "6–10 years", "More than 10 years"] }),
974    field("financed", "Did you finance your motorcycle?", "radio", { options: ["Yes", "No"] }),
975    values["financed"] === "Yes" && field("lenderNameAddress", "Lender Name and Address (as they would like it listed on the policy — typically a PO Box)", "textarea", { placeholder: "e.g. ABC Credit Union\nPO Box 12345\nDayton, OH 45401" })
976  ] });
977  if (changeType === "remove_vehicle") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
978    field("year", "Vehicle Year", "text", { placeholder: "e.g. 2019" }),
979    field("make", "Make", "text", { placeholder: "e.g. Ford" }),
980    field("model", "Model", "text", { placeholder: "e.g. F-150" }),
981    field("effectiveDate", "Requested Effective Date", "date"),
982    field("reason", "Reason for Removal", "select", { options: ["Sold", "Traded In", "No longer in household", "Other"], required: false }),
983    field("comments", "Additional Comments", "textarea", { placeholder: "Any additional details for your agent", required: false })
984  ] });
985  if (changeType === "replace_vehicle") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
986    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-3 text-sm text-blue-800", children: "Use this form when trading in a vehicle and adding a new one at the same time." }),
987    /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "font-semibold text-gray-700 text-sm", children: "Vehicle Being Removed (Trade-In)" }),
988    field("oldYear", "Year", "text", { placeholder: "e.g. 2019" }),
989    field("oldMake", "Make", "text", { placeholder: "e.g. Ford" }),
990    field("oldModel", "Model", "text", { placeholder: "e.g. F-150" }),
991    /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "font-semibold text-gray-700 text-sm pt-2", children: "New Vehicle Being Added" }),
992    field("newYear", "Year", "text", { placeholder: "e.g. 2024" }),
993    field("newMake", "Make", "text", { placeholder: "e.g. Chevrolet" }),
994    field("newModel", "Model", "text", { placeholder: "e.g. Silverado" }),
995    field("newVin", "VIN", "text", { placeholder: "17-character Vehicle Identification Number" }),
996    field("primaryDriver", "Primary Driver", "text", { placeholder: "Full name" }),
997    field("coverageRequested", "Coverage Requested", "select", { options: ["Liability Only", "Full Coverage", "Same as current policy", "Not sure — please advise"] }),
998    field("hasLienholder", "Is there a lienholder or financing company on the new vehicle?", "radio", { options: ["Yes", "No"] }),
999    values["hasLienholder"] === "Yes" && field("lienholderName", "Lienholder / Finance Company Name", "text", { placeholder: "e.g. Chase Auto Finance" }),
1000    values["hasLienholder"] === "Yes" && field("lienholderAccountNumber", "Account / Loan Number", "text", { placeholder: "e.g. 1234567890", required: false }),
1001    field("effectiveDate", "Requested Effective Date", "date"),
1002    field("comments", "Additional Comments", "textarea", { placeholder: "Any additional details for your agent", required: false })
1003  ] });
1004  if (changeType === "add_driver") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1005    field("driverName", "Driver's Full Name", "text", { placeholder: "First and last name" }),
1006    field("dob", "Date of Birth", "text", { placeholder: "MM/DD/YYYY" }),
1007    /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: [
1008      field("licenseNumber", "Driver's License Number", "text", { placeholder: "License number" }),
1009      /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1.5", children: [
1010        /* @__PURE__ */ jsxRuntimeExports.jsxs(Label, { className: "text-sm font-medium text-gray-700", children: [
1011          "License State ",
1012          /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-red-500", children: "*" })
1013        ] }),
1014        /* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { value: values["licenseState"] ?? "", onValueChange: (v) => onChange("licenseState", v), children: [
1015          /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "text-sm", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, { placeholder: "Select state" }) }),
1016          /* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: US_STATES.map((s) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: s, children: s }, s)) })
1017        ] })
1018      ] })
1019    ] }),
1020    field("relationship", "Relationship to Policyholder", "select", { options: ["Spouse", "Child", "Parent", "Other household member"] }),
1021    field("isStudent", "Is this driver currently a student still in school?", "radio", { options: ["Yes", "No"] }),
1022    values["isStudent"] === "Yes" && field("gpaOver3", "Does this student have a 3.0 GPA or better?", "radio", { options: ["Yes", "No"] }),
1023    field("effectiveDate", "Requested Effective Date", "date")
1024  ] });
1025  if (changeType === "remove_driver") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1026    field("driverName", "Driver's Full Name to Remove", "text", { placeholder: "First and last name" }),
1027    field("reason", "Reason for Removal", "select", { options: ["No longer in household", "Moved out", "Deceased", "Other"] }),
1028    field("effectiveDate", "Requested Effective Date", "date")
1029  ] });
1030  if (changeType === "change_coverage") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1031    field("vehicleDescription", "Vehicle (Year / Make / Model)", "text", { placeholder: "e.g. 2020 Honda Accord" }),
1032    field("currentCoverage", "Current Coverage", "select", { options: ["Liability Only", "Full Coverage", "Not sure"] }),
1033    field("requestedCoverage", "Requested Coverage", "select", { options: ["Liability Only", "Full Coverage", "Increase deductible", "Decrease deductible", "Add roadside assistance", "Remove roadside assistance", "Other"] }),
1034    field("effectiveDate", "Requested Effective Date", "date"),
1035    field("details", "Additional Details", "textarea", { placeholder: "Describe the specific changes you need", required: false })
1036  ] });
1037  if (changeType === "change_address") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1038    field("newAddress", "New Street Address", "text", { placeholder: "123 Main St" }),
1039    field("city", "City", "text", { placeholder: "City" }),
1040    field("state", "State", "text", { placeholder: "e.g. OH" }),
1041    field("zip", "ZIP Code", "text", { placeholder: "e.g. 45202" }),
1042    field("effectiveDate", "Effective Date", "date")
1043  ] });
1044  if (changeType === "lienholder_change") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1045    field("vehicleDescription", "Vehicle (Year / Make / Model)", "text", { placeholder: "e.g. 2021 Chevy Silverado" }),
1046    field("lienholderName", "Lienholder / Lessor Name", "text", { placeholder: "e.g. Chase Auto Finance" }),
1047    field("lienholderAddress", "Lienholder Address", "text", { placeholder: "Full mailing address", required: false }),
1048    field("loanNumber", "Loan / Lease Number", "text", { placeholder: "Account number", required: false }),
1049    field("effectiveDate", "Requested Effective Date", "date")
1050  ] });
1051  if (changeType === "add_property") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1052    field("propertyAddress", "Property Address", "text", { placeholder: "Full address" }),
1053    field("propertyType", "Property Type", "select", { options: ["Primary Home", "Rental Property", "Vacation Home", "Condo", "Renters"] }),
1054    field("coverageRequested", "Coverage Requested", "select", { options: ["Standard homeowners", "Rental / landlord", "Renters", "Not sure — please advise"] }),
1055    field("effectiveDate", "Requested Effective Date", "date")
1056  ] });
1057  if (changeType === "remove_property") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1058    field("propertyAddress", "Property Address to Remove", "text", { placeholder: "Full address" }),
1059    field("effectiveDate", "Requested Effective Date", "date"),
1060    field("reason", "Reason", "select", { options: ["Sold", "No longer own", "Other"], required: false })
1061  ] });
1062  if (changeType === "mortgage_change") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1063    field("propertyAddress", "Property Address", "text", { placeholder: "Full address" }),
1064    field("mortgageCompany", "Mortgage Company Name", "text", { placeholder: "e.g. Rocket Mortgage" }),
1065    field("mortgageAddress", "Mortgage Company Address", "text", { placeholder: "Full mailing address", required: false }),
1066    field("loanNumber", "Loan Number", "text", { placeholder: "Loan account number", required: false }),
1067    field("effectiveDate", "Requested Effective Date", "date")
1068  ] });
1069  if (changeType === "claim_auto_accident") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1070    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-orange-50 border border-orange-200 rounded-lg p-3 text-sm text-orange-800", children: "Please provide as much detail as possible. Your agent will contact you shortly." }),
1071    field("incidentDate", "Date of Incident", "text", { placeholder: "MM/DD/YYYY" }),
1072    field("incidentTime", "Time of Incident", "text", { placeholder: "e.g. 2:30 PM" }),
1073    field("driversInvolved", "Drivers Involved", "textarea", { placeholder: "List all drivers involved (name, contact info if known)" }),
1074    field("vehiclesInvolved", "Vehicles Involved", "textarea", { placeholder: "Year / Make / Model for each vehicle involved" }),
1075    field("anyoneInjured", "Were any injuries reported?", "radio", { options: ["Yes", "No"] }),
1076    values["anyoneInjured"] === "Yes" && field("injuryDescription", "Describe the injuries", "textarea", { placeholder: "Describe injuries reported by any party" }),
1077    field("faultDetermination", "How was fault determined (if at all)?", "select", { options: ["Determined by law enforcement", "Agreed upon between parties", "Not yet determined", "No fault determination made"] }),
1078    field("policeReport", "Was a police report filed?", "radio", { options: ["Yes", "No"], required: false }),
1079    field("additionalDetails", "Any other details?", "textarea", { placeholder: "Location, weather conditions, witness info, etc.", required: false })
1080  ] });
1081  if (changeType === "claim_glass_repair") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1082    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-3 text-sm text-blue-800", children: "For glass repair or replacement, we just need a few quick details. Your agent will reach out to get the process started." }),
1083    field("vehicleDescription", "Which vehicle needs glass repair?", "text", { placeholder: "Year / Make / Model (e.g. 2020 Toyota Camry)" }),
1084    field("glassType", "What type of glass?", "select", { options: ["Windshield", "Driver side window", "Passenger side window", "Rear window", "Other"] }),
1085    field("damageDescription", "Describe the damage", "textarea", { placeholder: "e.g. Crack from a rock chip, shattered window, etc.", required: false })
1086  ] });
1087  if (changeType === "claim_home_damage") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1088    field("propertyAddress", "Property Address", "text", { placeholder: "Address of damaged property" }),
1089    field("incidentDate", "Date of Incident", "text", { placeholder: "MM/DD/YYYY" }),
1090    field("damageType", "Type of Damage", "select", { options: ["Wind / Storm", "Water / Flood", "Fire", "Theft / Vandalism", "Hail", "Other"] }),
1091    field("damageDescription", "Describe the Damage", "textarea", { placeholder: "Describe what was damaged and how" }),
1092    field("tempRepairsMade", "Have any temporary repairs been made?", "radio", { options: ["Yes", "No"], required: false })
1093  ] });
1094  if (changeType === "change_beneficiary") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1095    field("newBeneficiaryName", "New Beneficiary Full Name", "text", { placeholder: "First and last name" }),
1096    field("newBeneficiaryRelationship", "Relationship to Insured", "text", { placeholder: "e.g. Spouse, Child, Parent" }),
1097    field("newBeneficiaryDob", "Beneficiary Date of Birth", "text", { placeholder: "MM/DD/YYYY", required: false }),
1098    field("beneficiaryPercentage", "Percentage Allocated", "text", { placeholder: "e.g. 100% or 50%", required: false }),
1099    field("effectiveDate", "Requested Effective Date", "date")
1100  ] });
1101  if (changeType === "add_location") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1102    field("locationAddress", "New Location Address", "text", { placeholder: "Full address" }),
1103    field("businessType", "Type of Business at this Location", "text", { placeholder: "e.g. Retail store, warehouse, office" }),
1104    field("coverageNeeded", "Coverage Needed", "textarea", { placeholder: "Describe the coverage you need for this location", required: false }),
1105    field("effectiveDate", "Requested Effective Date", "date")
1106  ] });
1107  if (changeType === "add_vehicle_commercial") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1108    field("year", "Vehicle Year", "text", { placeholder: "e.g. 2023" }),
1109    field("make", "Make", "text", { placeholder: "e.g. Ford" }),
1110    field("model", "Model", "text", { placeholder: "e.g. Transit Van" }),
1111    field("vin", "VIN (if available)", "text", { placeholder: "17-character VIN", required: false }),
1112    field("primaryUse", "Primary Use", "text", { placeholder: "e.g. Delivery, service calls, transport" }),
1113    field("effectiveDate", "Requested Effective Date", "date")
1114  ] });
1115  if (changeType === "name_change") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1116    field("oldName", "Current Name on Policy", "text", { placeholder: "Full name as it appears on policy" }),
1117    field("newName", "New Legal Name", "text", { placeholder: "Full new legal name" }),
1118    field("reason", "Reason for Change", "select", { options: ["Marriage", "Divorce", "Legal name change", "Correction", "Other"] }),
1119    field("effectiveDate", "Requested Effective Date", "date")
1120  ] });
1121  if (changeType === "billing_change") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1122    field("changeRequested", "What would you like to change?", "select", { options: ["Update payment method", "Change billing date", "Switch to paperless billing", "Switch to paper billing", "Other billing change"] }),
1123    field("effectiveDate", "Requested Effective Date", "date"),
1124    field("details", "Additional Details", "textarea", { placeholder: "Describe the change you need", required: false })
1125  ] });
1126  if (changeType === "cancel_policy") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1127    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-red-50 border border-red-200 rounded-lg p-3 text-sm text-red-800", children: "Your agent will contact you to confirm cancellation and discuss any options before processing." }),
1128    field("policyType", "Which Policy?", "select", { options: ["Auto", "Home / Property", "Life", "Commercial", "Other"] }),
1129    field("effectiveDate", "Requested Cancellation Date", "date"),
1130    field("reason", "Reason for Cancellation", "select", { options: ["Switching carriers", "No longer need coverage", "Sold property/vehicle", "Moving out of state", "Other"] })
1131  ] });
1132  if (changeType === "request_id_card") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1133    field("documentType", "What do you need?", "select", { options: ["Auto ID Cards", "Proof of Insurance Letter", "Declarations Page", "Other Document"] }),
1134    field("deliveryMethod", "How would you like it delivered?", "select", { options: ["Email", "Mail", "Both"] }),
1135    field("details", "Additional Details", "textarea", { placeholder: "Any specific details or instructions", required: false })
1136  ] });
1137  if (changeType === "other_auto") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1138    field("description", "Describe the change you need", "textarea", { placeholder: "Please provide as much detail as possible" }),
1139    field("vehicleDescription", "Vehicle (Year / Make / Model)", "text", { placeholder: "e.g. 2021 Honda Civic", required: false }),
1140    field("effectiveDate", "Requested Effective Date", "date", { required: false })
1141  ] });
1142  if (changeType === "change_address_home") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1143    field("currentAddress", "Current Property Address on Policy", "text", { placeholder: "Full address" }),
1144    field("newAddress", "New Street Address", "text", { placeholder: "123 Main St" }),
1145    field("city", "City", "text", { placeholder: "City" }),
1146    field("state", "State", "text", { placeholder: "e.g. OH" }),
1147    field("zip", "ZIP Code", "text", { placeholder: "e.g. 45202" }),
1148    field("effectiveDate", "Effective Date", "date")
1149  ] });
1150  if (changeType === "change_coverage_home") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1151    field("propertyAddress", "Property Address", "text", { placeholder: "Full address" }),
1152    field("changeRequested", "What coverage change do you need?", "select", { options: ["Increase dwelling coverage", "Decrease dwelling coverage", "Add personal property coverage", "Add liability coverage", "Add flood insurance", "Add earthquake coverage", "Change deductible", "Other"] }),
1153    field("effectiveDate", "Requested Effective Date", "date"),
1154    field("details", "Additional Details", "textarea", { placeholder: "Describe the specific changes you need", required: false })
1155  ] });
1156  if (changeType === "other_home") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1157    field("propertyAddress", "Property Address", "text", { placeholder: "Full address", required: false }),
1158    field("description", "Describe the change you need", "textarea", { placeholder: "Please provide as much detail as possible" }),
1159    field("effectiveDate", "Requested Effective Date", "date", { required: false })
1160  ] });
1161  if (changeType === "quote_auto") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1162    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-purple-50 border border-purple-200 rounded-lg p-3 text-sm text-purple-800", children: "Your agent will prepare a competitive auto insurance quote for you." }),
1163    field("vehicleYear", "Vehicle Year", "text", { placeholder: "e.g. 2023" }),
1164    field("vehicleMake", "Make", "text", { placeholder: "e.g. Toyota" }),
1165    field("vehicleModel", "Model", "text", { placeholder: "e.g. Camry" }),
1166    field("vin", "VIN", "text", { placeholder: "17-character Vehicle Identification Number" }),
1167    field("currentCarrier", "Current Insurance Carrier (if any)", "text", { placeholder: "e.g. State Farm", required: false }),
1168    field("coveragePreference", "Coverage Preference", "select", { options: ["Liability Only", "Full Coverage", "Not sure — please advise"] }),
1169    field("driverCount", "Number of Drivers in Household", "text", { placeholder: "e.g. 2" })
1170  ] });
1171  if (changeType === "quote_home") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1172    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-purple-50 border border-purple-200 rounded-lg p-3 text-sm text-purple-800", children: "Your agent will prepare a home or renters insurance quote for you." }),
1173    field("propertyAddress", "Property Address", "text", { placeholder: "Full address of the property to insure" }),
1174    field("propertyType", "Property Type", "select", { options: ["Primary Home (owned)", "Rental Property", "Condo", "Renters / Apartment", "Vacation / Second Home"] }),
1175    field("yearBuilt", "Year Built (if known)", "text", { placeholder: "e.g. 1998", required: false }),
1176    field("squareFootage", "Approximate Square Footage", "text", { placeholder: "e.g. 1,800 sq ft", required: false }),
1177    field("currentCarrier", "Current Insurance Carrier (if any)", "text", { placeholder: "e.g. Allstate", required: false })
1178  ] });
1179  if (changeType === "quote_life") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1180    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-purple-50 border border-purple-200 rounded-lg p-3 text-sm text-purple-800", children: "Your agent will reach out to discuss life insurance options tailored to your needs." }),
1181    field("coverageType", "Type of Life Insurance", "select", { options: ["Term Life", "Whole Life", "Universal Life", "Not sure — please advise"] }),
1182    field("coverageAmount", "Desired Coverage Amount", "select", { options: ["$100,000", "$250,000", "$500,000", "$1,000,000", "More than $1,000,000", "Not sure"] }),
1183    field("tobaccoUse", "Do you currently use tobacco products?", "radio", { options: ["Yes", "No"] }),
1184    field("existingCoverage", "Do you currently have life insurance?", "radio", { options: ["Yes", "No"] })
1185  ] });
1186  if (changeType === "quote_commercial") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1187    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-purple-50 border border-purple-200 rounded-lg p-3 text-sm text-purple-800", children: "Your agent will prepare a commercial or business insurance quote for you." }),
1188    field("businessName", "Business Name", "text", { placeholder: "Legal business name" }),
1189    field("businessType", "Type of Business", "text", { placeholder: "e.g. Contractor, Retail, Restaurant, Consulting" }),
1190    field("businessAddress", "Business Address", "text", { placeholder: "Full address" }),
1191    field("coverageNeeded", "Coverage Needed", "select", { options: ["General Liability", "Commercial Auto", "Workers Comp", "Business Owners Policy (BOP)", "Professional Liability", "Multiple / Bundle", "Not sure — please advise"] }),
1192    field("employeeCount", "Number of Employees", "text", { placeholder: "e.g. 5", required: false }),
1193    field("currentCarrier", "Current Carrier (if any)", "text", { placeholder: "e.g. Travelers", required: false })
1194  ] });
1195  if (changeType === "quote_umbrella") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1196    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-purple-50 border border-purple-200 rounded-lg p-3 text-sm text-purple-800", children: "An umbrella policy provides extra liability coverage above your existing policies. Your agent will review your current coverage and recommend appropriate limits." }),
1197    field("currentPolicies", "What policies do you currently have with us?", "select", { options: ["Auto only", "Home only", "Auto and Home", "Auto, Home, and other", "Not sure"] }),
1198    field("coverageAmount", "Desired Umbrella Coverage Amount", "select", { options: ["$1,000,000", "$2,000,000", "$3,000,000", "$5,000,000", "Not sure — please advise"] }),
1199    field("details", "Additional Details", "textarea", { placeholder: "Any specific concerns or questions", required: false })
1200  ] });
1201  if (changeType === "quote_motorhome") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1202    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-purple-50 border border-purple-200 rounded-lg p-3 text-sm text-purple-800", children: "Please fill out the details below so your agent can prepare a motorhome or RV insurance quote." }),
1203    field("year", "Year", "text", { placeholder: "e.g. 2022" }),
1204    field("make", "Make", "text", { placeholder: "e.g. Winnebago, Thor, Coachmen" }),
1205    field("model", "Model", "text", { placeholder: "e.g. Minnie Winnie 22R" }),
1206    field("vin", "VIN (if known)", "text", { placeholder: "17-character Vehicle Identification Number", required: false }),
1207    field("rvClass", "RV Class / Type", "select", { options: ["Class A (large motorhome)", "Class B (camper van)", "Class C (mid-size motorhome)", "Not sure"] }),
1208    field("length", "Approximate Length (feet)", "text", { placeholder: "e.g. 32", required: false }),
1209    field("usageType", "How will you use this RV?", "select", { options: ["Recreational (part-time)", "Full-timer (primary residence)", "Seasonal", "Not sure"] }),
1210    field("storageLocation", "Where will the RV be stored when not in use?", "text", { placeholder: "e.g. Home driveway, storage facility, campground", required: false }),
1211    field("financed", "Is this RV financed?", "radio", { options: ["Yes", "No"] }),
1212    values["financed"] === "Yes" && field("lienholderName", "Lender / Finance C
1212ompany Name", "text", { placeholder: "e.g. Good Sam Finance" }),
1213    field("currentCarrier", "Current Insurance Carrier (if any)", "text", { placeholder: "e.g. Progressive", required: false })
1214  ] });
1215  if (changeType === "add_camper_travel_trailer" || changeType === "quote_camper") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1216    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-purple-50 border border-purple-200 rounded-lg p-3 text-sm text-purple-800", children: changeType === "add_camper_travel_trailer" ? "Please provide the details below so your agent can add this camper or travel trailer to your existing policy." : "Please fill out the details below so your agent can prepare a camper or travel trailer insurance quote." }),
1217    field("year", "Year", "text", { placeholder: "e.g. 2021" }),
1218    field("make", "Make", "text", { placeholder: "e.g. Forest River, Keystone, Airstream" }),
1219    field("model", "Model", "text", { placeholder: "e.g. Wildwood 26DBUD" }),
1220    field("camperValue", "Camper / Travel Trailer Value", "text", { placeholder: "e.g. $25,000" }),
1221    field("vin", "VIN (if known)", "text", { placeholder: "17-character VIN", required: false }),
1222    field("camperType", "Type of Camper", "select", { options: ["Travel Trailer", "Fifth Wheel", "Pop-Up / Folding Camper", "Toy Hauler", "Teardrop Trailer", "Truck Camper", "Not sure"] }),
1223    field("length", "Approximate Length (feet)", "text", { placeholder: "e.g. 28", required: false }),
1224    field("storageLocation", "Where will the camper be stored when not in use?", "text", { placeholder: "e.g. Home property, storage facility, campground" }),
1225    field("usageFrequency", "How often do you use it?", "select", { options: ["Weekends only", "Several times per month", "Seasonal (3-6 months)", "Year-round"] }),
1226    field("financed", "Is this camper financed?", "radio", { options: ["Yes", "No"] }),
1227    values["financed"] === "Yes" && field("lienholderName", "Lender / Finance Company Name", "text", { placeholder: "e.g. Camping World Finance" }),
1228    changeType === "quote_camper" && field("currentCarrier", "Current Insurance Carrier (if any)", "text", { placeholder: "e.g. National General", required: false }),
1229    changeType === "add_camper_travel_trailer" && field("effectiveDate", "Requested Effective Date", "date")
1230  ] });
1231  if (changeType === "quote_motorcycle") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1232    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-purple-50 border border-purple-200 rounded-lg p-3 text-sm text-purple-800", children: "Please fill out the details below so your agent can prepare a motorcycle insurance quote." }),
1233    field("year", "Year", "text", { placeholder: "e.g. 2023" }),
1234    field("make", "Make", "text", { placeholder: "e.g. Harley-Davidson, Honda, Kawasaki" }),
1235    field("model", "Model", "text", { placeholder: "e.g. Sportster S" }),
1236    field("vin", "VIN (if known)", "text", { placeholder: "17-character VIN", required: false }),
1237    field("engineCC", "Engine Size (cc)", "text", { placeholder: "e.g. 1250" }),
1238    field("hasEndorsement", "Do you have a motorcycle endorsement on your license?", "radio", { options: ["Yes", "No"] }),
1239    field("yearsExperience", "Years of riding experience", "select", { options: ["Less than 1 year", "1 year", "2 years", "3 years", "4 years", "5 years", "6-10 years", "More than 10 years"] }),
1240    field("completedSafetyCourse", "Have you completed a motorcycle safety course?", "radio", { options: ["Yes", "No"] }),
1241    field("coveragePreference", "Coverage Preference", "select", { options: ["Liability Only", "Full Coverage", "Not sure - please advise"] }),
1242    field("financed", "Is this motorcycle financed?", "radio", { options: ["Yes", "No"] }),
1243    values["financed"] === "Yes" && field("lienholderName", "Lender / Finance Company Name", "text", { placeholder: "e.g. Harley-Davidson Financial" }),
1244    field("currentCarrier", "Current Insurance Carrier (if any)", "text", { placeholder: "e.g. Progressive", required: false })
1245  ] });
1246  if (changeType === "quote_boat") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1247    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-purple-50 border border-purple-200 rounded-lg p-3 text-sm text-purple-800", children: "Please fill out the details below so your agent can prepare a boat or watercraft insurance quote." }),
1248    field("year", "Year", "text", { placeholder: "e.g. 2020" }),
1249    field("make", "Make / Manufacturer", "text", { placeholder: "e.g. Lund, Tracker, Sea Ray" }),
1250    field("model", "Model", "text", { placeholder: "e.g. Pro V 1875" }),
1251    field("hin", "Hull Identification Number (HIN, if known)", "text", { placeholder: "12-character HIN", required: false }),
1252    field("boatType", "Type of Watercraft", "select", { options: ["Fishing Boat", "Pontoon", "Speedboat / Runabout", "Sailboat", "Jet Ski / PWC", "Cabin Cruiser", "Kayak / Canoe", "Other"] }),
1253    field("boatLength", "Length (feet)", "text", { placeholder: "e.g. 18", required: false }),
1254    field("engineHP", "Engine Horsepower (if applicable)", "text", { placeholder: "e.g. 150 HP", required: false }),
1255    field("storageLocation", "Where is the boat stored?", "select", { options: ["Home / garage", "Marina slip", "Dry storage facility", "Lake / water year-round", "Other"] }),
1256    field("financed", "Is this boat financed?", "radio", { options: ["Yes", "No"] }),
1257    values["financed"] === "Yes" && field("lienholderName", "Lender / Finance Company Name", "text", { placeholder: "e.g. Marine Finance Corp" }),
1258    field("currentCarrier", "Current Insurance Carrier (if any)", "text", { placeholder: "e.g. Markel", required: false })
1259  ] });
1260  if (changeType === "quote_atv") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1261    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-purple-50 border border-purple-200 rounded-lg p-3 text-sm text-purple-800", children: "Please fill out the details below so your agent can prepare an ATV or off-road vehicle insurance quote." }),
1262    field("year", "Year", "text", { placeholder: "e.g. 2023" }),
1263    field("make", "Make", "text", { placeholder: "e.g. Polaris, Can-Am, Yamaha, Honda" }),
1264    field("model", "Model", "text", { placeholder: "e.g. Sportsman 570" }),
1265    field("vin", "VIN (if known)", "text", { placeholder: "17-character VIN", required: false }),
1266    field("vehicleType", "Type of Vehicle", "select", { options: ["ATV (4-wheeler)", "Side-by-Side / UTV", "Dirt Bike / Motocross", "Snowmobile", "Golf Cart", "Other Off-Road"] }),
1267    field("engineCC", "Engine Size (cc)", "text", { placeholder: "e.g. 570", required: false }),
1268    field("primaryUse", "Primary Use", "select", { options: ["Recreation / Trail Riding", "Farm / Ranch / Utility", "Racing / Competition", "Hunting", "Multiple Uses"] }),
1269    field("storageLocation", "Where is the vehicle stored?", "text", { placeholder: "e.g. Home garage, barn, storage unit" }),
1270    field("financed", "Is this vehicle financed?", "radio", { options: ["Yes", "No"] }),
1271    values["financed"] === "Yes" && field("lienholderName", "Lender / Finance Company Name", "text", { placeholder: "e.g. Polaris Acceptance" }),
1272    field("currentCarrier", "Current Insurance Carrier (if any)", "text", { placeholder: "e.g. Progressive", required: false })
1273  ] });
1274  if (changeType === "quote_other") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1275    field("coverageType", "What type of coverage are you looking for?", "text", { placeholder: "e.g. Snowmobile, Pet insurance, Flood, Umbrella, etc." }),
1276    field("details", "Tell us more about what you need", "textarea", { placeholder: "Describe the coverage you are looking for and any relevant details" })
1277  ] });
1278  if (changeType === "change_coverage_life") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1279    field("changeRequested", "What change do you need?", "select", { options: ["Increase coverage amount", "Decrease coverage amount", "Change term length", "Convert term to permanent", "Other"] }),
1280    field("effectiveDate", "Requested Effective Date", "date"),
1281    field("details", "Additional Details", "textarea", { placeholder: "Describe the change you need", required: false })
1282  ] });
1283  if (changeType === "address_change_life") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1284    field("newAddress", "New Street Address", "text", { placeholder: "123 Main St" }),
1285    field("city", "City", "text", { placeholder: "City" }),
1286    field("state", "State", "text", { placeholder: "e.g. OH" }),
1287    field("zip", "ZIP Code", "text", { placeholder: "e.g. 45202" }),
1288    field("effectiveDate", "Requested Effective Date", "date")
1289  ] });
1290  if (changeType === "other_life") return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-4", children: field("description", "Describe the change you need", "textarea", { placeholder: "Please provide as much detail as possible" }) });
1291  if (changeType === "remove_location") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1292    field("locationAddress", "Location Address to Remove", "text", { placeholder: "Full address" }),
1293    field("effectiveDate", "Requested Effective Date", "date"),
1294    field("reason", "Reason for Removal", "select", { options: ["Closed", "Sold", "Relocated", "Other"], required: false })
1295  ] });
1296  if (changeType === "remove_vehicle_commercial") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1297    field("year", "Vehicle Year", "text", { placeholder: "e.g. 2019" }),
1298    field("make", "Make", "text", { placeholder: "e.g. Ford" }),
1299    field("model", "Model", "text", { placeholder: "e.g. Transit Van" }),
1300    field("vin", "VIN (if known)", "text", { placeholder: "17-character VIN", required: false }),
1301    field("effectiveDate", "Requested Effective Date", "date"),
1302    field("reason", "Reason for Removal", "select", { options: ["Sold", "Totaled", "No longer in use", "Other"], required: false })
1303  ] });
1304  if (changeType === "change_coverage_commercial") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1305    field("businessName", "Business Name", "text", { placeholder: "Legal business name" }),
1306    field("coverageType", "Which coverage needs to change?", "select", { options: ["General Liability", "Commercial Auto", "Workers Comp", "Business Owners Policy (BOP)", "Professional Liability", "Other"] }),
1307    field("changeRequested", "What change do you need?", "textarea", { placeholder: "Describe the specific coverage change" }),
1308    field("effectiveDate", "Requested Effective Date", "date", { required: false })
1309  ] });
1310  if (changeType === "add_employee") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1311    field("employeeName", "Employee Full Name", "text", { placeholder: "First and last name" }),
1312    field("employeeTitle", "Job Title / Role", "text", { placeholder: "e.g. Driver, Technician, Manager" }),
1313    field("startDate", "Start Date", "text", { placeholder: "MM/DD/YYYY" }),
1314    field("licenseNumber", "Driver's License Number (if driving company vehicles)", "text", { placeholder: "License number", required: false }),
1315    field("licenseState", "License State", "text", { placeholder: "e.g. OH", required: false }),
1316    field("effectiveDate", "Requested Effective Date", "date"),
1317    field("additionalInfo", "Additional Information", "textarea", { placeholder: "Any other relevant details", required: false })
1318  ] });
1319  if (changeType === "other_commercial") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1320    field("businessName", "Business Name", "text", { placeholder: "Legal business name", required: false }),
1321    field("description", "Describe the change you need", "textarea", { placeholder: "Please provide as much detail as possible" }),
1322    field("effectiveDate", "Requested Effective Date", "date", { required: false })
1323  ] });
1324  if (changeType === "other_general") return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
1325    field("description", "Describe your request", "textarea", { placeholder: "Please provide as much detail as possible so your agent can assist you quickly" }),
1326    field("effectiveDate", "Requested Effective Date (if applicable)", "date", { required: false })
1327  ] });
1328  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "space-y-4", children: field("description", "Please describe your request", "textarea", { placeholder: "Provide as much detail as possible so your agent can assist you quickly" }) });
1329}
1330function PolicyChangeForm() {
1331  const params = useParams();
1332  useLocation();
1333  const urlSearchParams = new URLSearchParams(typeof window !== "undefined" ? window.location.search : "");
1334  const [step, setStep] = reactExports.useState(1);
1335  const [selectedCategory, setSelectedCategory] = reactExports.useState(null);
1336  const [selectedChangeType, setSelectedChangeType] = reactExports.useState(null);
1337  const [changeDetails, setChangeDetails] = reactExports.useState({});
1338  const [additionalNotes, setAdditionalNotes] = reactExports.useState("");
1339  const [policyNumber, setPolicyNumber] = reactExports.useState("");
1340  const [idCardFileUrl, setIdCardFileUrl] = reactExports.useState("");
1341  const [idCardFileName, setIdCardFileName] = reactExports.useState("");
1342  const [idCardExtractionNote, setIdCardExtractionNote] = reactExports.useState("");
1343  const idCardInputRef = reactExports.useRef(null);
1344  const [additionalTasks, setAdditionalTasks] = reactExports.useState([]);
1345  function addTask() {
1346    setAdditionalTasks((prev) => [...prev, { category: "", changeType: "", changeDetails: {} }]);
1347  }
1348  function removeTask(idx) {
1349    setAdditionalTasks((prev) => prev.filter((_, i) => i !== idx));
1350  }
1351  function updateTaskCategory(idx, catId) {
1352    setAdditionalTasks((prev) => prev.map((t, i) => i === idx ? { category: catId, changeType: "", changeDetails: {} } : t));
1353  }
1354  function updateTaskType(idx, typeId) {
1355    setAdditionalTasks((prev) => prev.map((t, i) => i === idx ? { ...t, changeType: typeId, changeDetails: {} } : t));
1356  }
1357  function updateTaskDetail(idx, key, val) {
1358    setAdditionalTasks((prev) => prev.map((t, i) => i === idx ? { ...t, changeDetails: { ...t.changeDetails, [key]: val } } : t));
1359  }
1360  const [clientName, setClientName] = reactExports.useState(() => urlSearchParams.get("name") ?? "");
1361  const [clientEmail, setClientEmail] = reactExports.useState(() => urlSearchParams.get("email") ?? "");
1362  const [clientPhone, setClientPhone] = reactExports.useState(() => urlSearchParams.get("phone") ?? "");
1363  const [selectedAgentKey, setSelectedAgentKey] = reactExports.useState(params.agentSlug ?? "");
1364  const [confirmationPreference, setConfirmationPreference] = reactExports.useState("email");
1365  const [submitted, setSubmitted] = reactExports.useState(false);
1366  const [submittedRequestId, setSubmittedRequestId] = reactExports.useState(null);
1367  const { data: agentInfo } = trpc.policyChange.getAgentBySlug.useQuery(
1368    { slug: params.agentSlug ?? "" },
1369    { enabled: !!params.agentSlug }
1370  );
1371  const { data: agents } = trpc.policyChange.getAgents.useQuery();
1372  reactExports.useEffect(() => {
1373    if (params.agentSlug && !selectedAgentKey) {
1374      setSelectedAgentKey(params.agentSlug);
1375    }
1376  }, [params.agentSlug]);
1377  const submitMutation = trpc.policyChange.submit.useMutation({
1378    onSuccess: (data) => {
1379      setSubmitted(true);
1380      setSubmittedRequestId(data.requestId);
1381    },
1382    onError: (err) => {
1383      toast.error(err.message || "Something went wrong. Please try again.");
1384    }
1385  });
1386  const idCardExtraction = trpc.policyChange.extractPolicyNumberFromIdCard.useMutation({
1387    onSuccess: (data) => {
1388      setIdCardFileUrl(data.fileUrl);
1389      if (data.policyNumber) {
1390        setPolicyNumber(data.policyNumber);
1391        setIdCardExtractionNote("Policy number read from the photo. Please verify or correct it before continuing.");
1392        toast.success("Policy number found — please review it.");
1393      } else {
1394        setIdCardExtractionNote("We saved the photo but could not clearly read a policy number. Please enter it manually.");
1395        toast.message("Please enter the policy number manually.");
1396      }
1397    },
1398    onError: (err) => toast.error(err.message || "We could not read that ID card. Please enter the policy number manually.")
1399  });
1400  const category = CATEGORIES.find((c) => c.id === selectedCategory);
1401  const changeTypeLabel = category?.changeTypes.find((t) => t.id === selectedChangeType)?.label ?? "";
1402  const requiresPolicyNumber = selectedCategory !== "new_coverage";
1403  function handleDetailChange(key, val) {
1404    setChangeDetails((prev) => ({ ...prev, [key]: val }));
1405  }
1406  function validateCamperValues() {
1407    if (selectedChangeType) {
1408      const primaryValidation = validateCamperTravelTrailerValue(selectedChangeType, changeDetails);
1409      if (!primaryValidation.valid) {
1410        toast.error(primaryValidation.message);
1411        return false;
1412      }
1413    }
1414    for (let index = 0; index < additionalTasks.length; index += 1) {
1415      const task = additionalTasks[index];
1416      if (!task.changeType) continue;
1417      const taskValidation = validateCamperTravelTrailerValue(task.changeType, task.changeDetails);
1418      if (!taskValidation.valid) {
1419        toast.error(`Additional change #${index + 2}: ${taskValidation.message}`);
1420        return false;
1421      }
1422    }
1423    return true;
1424  }
1425  function handleCategorySelect(catId) {
1426    setSelectedCategory(catId);
1427    setSelectedChangeType(null);
1428    setChangeDetails({});
1429    setPolicyNumber("");
1430    setIdCardFileUrl("");
1431    setIdCardFileName("");
1432    setIdCardExtractionNote("");
1433    setAdditionalTasks([]);
1434    setStep(2);
1435  }
1436  function handleChangeTypeSelect(typeId) {
1437    setSelectedChangeType(typeId);
1438    setChangeDetails({});
1439  }
1440  function handleIdCardFile(file) {
1441    if (!file) return;
1442    const acceptedTypes = ["image/jpeg", "image/png", "image/webp"];
1443    if (!acceptedTypes.includes(file.type)) {
1444      toast.error("Please upload a JPG, PNG, or WebP image of the insurance ID card.");
1445      return;
1446    }
1447    if (file.size > 5 * 1024 * 1024) {
1448      toast.error("Please choose an ID-card image smaller than 5 MB.");
1449      return;
1450    }
1451    const reader = new FileReader();
1452    reader.onload = () => {
1453      const dataUrl = String(reader.result ?? "");
1454      const base64 = dataUrl.split(",")[1];
1455      if (!base64) {
1456        toast.error("We could not read that image. Please try another photo.");
1457        return;
1458      }
1459      setIdCardFileName(file.name);
1460      setIdCardExtractionNote("");
1461      idCardExtraction.mutate({ fileName: file.name, mimeType: file.type, base64 });
1462    };
1463    reader.readAsDataURL(file);
1464  }
1465  function handleBack() {
1466    if (step === 2) {
1467      setStep(1);
1468      setSelectedChangeType(null);
1469      setChangeDetails({});
1470      setAdditionalTasks([]);
1471    }
1472    if (step === 3) {
1473      setStep(2);
1474    }
1475    if (step === 4) {
1476      setStep(3);
1477    }
1478  }
1479  function handleSubmit() {
1480    if (!clientName.trim()) {
1481      toast.error("Please enter your full name.");
1482      return;
1483    }
1484    if (!clientEmail.trim() || !clientEmail.includes("@")) {
1485      toast.error("Please enter a valid email address.");
1486      return;
1487    }
1488    if (!clientPhone.trim()) {
1489      toast.error("Please enter your cell phone number.");
1490      return;
1491    }
1492    if (!selectedAgentKey) {
1493      toast.error("Please select your insurance agent.");
1494      return;
1495    }
1496    if (!selectedCategory || !selectedChangeType) {
1497      toast.error("Please complete all steps.");
1498      return;
1499    }
1500    if (requiresPolicyNumber && !policyNumber.trim()) {
1501      toast.error("Please enter the policy number so we can update the correct policy.");
1502      return;
1503    }
1504    if (!validateCamperValues()) return;
1505    submitMutation.mutate({
1506      agentKey: selectedAgentKey,
1507      agentSlug: params.agentSlug ?? selectedAgentKey,
1508      clientName: clientName.trim(),
1509      clientEmail: clientEmail.trim(),
1510      clientPhone: clientPhone.trim(),
1511      policyNumber: policyNumber.trim() || void 0,
1512      changeCategory: selectedCategory,
1513      changeType: selectedChangeType,
1514      changeDetails,
1515      additionalTasks: additionalTasks.filter((t) => t.changeType).map((t) => ({
1516        changeType: t.changeType,
1517        changeDetails: { ...t.changeDetails, __category: t.category }
1518      })),
1519      additionalNotes: additionalNotes.trim() || void 0,
1520      confirmationPreference,
1521      fileUrls: idCardFileUrl ? [idCardFileUrl] : void 0,
1522      attachmentKeys: []
1523    });
1524  }
1525  if (submitted) {
1526    const agent = agents?.find((a) => a.agentKey === selectedAgentKey);
1527    return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "min-h-screen bg-gradient-to-br from-[#2d2c5a] to-[#3C3B6E] flex items-center justify-center p-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white rounded-2xl shadow-2xl max-w-md w-full p-8 text-center", children: [
1528      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CircleCheck, { className: "w-8 h-8 text-green-600" }) }),
1529      /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-2xl font-bold text-gray-900 mb-2", children: "Request Received!" }),
1530      /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-gray-500 mb-1", children: [
1531        "Confirmation #",
1532        submittedRequestId
1533      ] }),
1534      /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-gray-600 text-sm mb-6", children: [
1535        "Your policy change request has been sent to your agent.",
1536        confirmationPreference === "email" ? " A confirmation email has been sent to your inbox." : " A confirmation has been sent to your email (SMS delivery coming soon)."
1537      ] }),
1538      agent && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-gray-50 rounded-xl p-4 mb-6 text-left", children: [
1539        /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-gray-500 uppercase tracking-wide mb-2", children: "Your Assigned Agent" }),
1540        /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "font-semibold text-gray-900", children: agent.agentName }),
1541        agent.email && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-blue-600", children: agent.email })
1542      ] }),
1543      /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-gray-400", children: "You will receive another notification when your agent completes your request. If you have questions, contact your agent directly." })
1544    ] }) });
1545  }
1546  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-h-screen bg-gradient-to-br from-[#2d2c5a] to-[#3C3B6E]", children: [
1547    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-[#2d2c5a]/80 border-b border-white/10 px-4 py-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "max-w-3xl mx-auto flex items-center justify-between", children: [
1548      /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3", children: [
1549        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-9 h-9 rounded-lg bg-[#B22234] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ShieldCheck, { className: "w-5 h-5 text-white" }) }),
1550        /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
1551          /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-white font-bold text-sm leading-tight", children: "Expert Protection Services" }),
1552          /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[#B22234] text-xs", children: "Policy Change Request" })
1553        ] })
1554      ] }),
1555      (agentInfo || agents && selectedAgentKey) && (() => {
1556        const agent = agentInfo ?? agents?.find((a) => a.agentKey === selectedAgentKey);
1557        if (!agent) return null;
1558        return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-right hidden sm:block", children: [
1559          /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-white/60 text-xs", children: "Your Agent" }),
1560          /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-white font-semibold text-sm", children: agent.agentName }),
1561          agent.email && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[#B22234] text-xs", children: agent.email })
1562        ] });
1563      })()
1564    ] }) }),
1565    (agentInfo || agents && selectedAgentKey) && (() => {
1566      const agent = agentInfo ?? agents?.find((a) => a.agentKey === selectedAgentKey);
1567      if (!agent) return null;
1568      return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "sm:hidden bg-[#B22234]/10 border-b border-[#B22234]/20 px-4 py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "max-w-3xl mx-auto flex items-center gap-2", children: [
1569        /* @__PURE__ */ jsxRuntimeExports.jsx(User, { className: "w-3.5 h-3.5 text-[#B22234]" }),
1570        /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-white text-xs", children: [
1571          "Your agent: ",
1572          /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: agent.agentName })
1573        ] }),
1574        agent.email && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "text-[#B22234] text-xs ml-1", children: [
1575          "· ",
1576          agent.email
1577        ] })
1578      ] }) });
1579    })(),
1580    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-white/5 px-4 py-3", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "max-w-3xl mx-auto flex items-center gap-2", children: [
1581      { n: 1, label: "Choose Category" },
1582      { n: 2, label: "Request Details" },
1583      { n: 3, label: "Your Information" },
1584      { n: 4, label: "Review & Confirm" }
1585    ].map(({ n, label }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 flex-1", children: [
1586      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `w-7 h-7 rounded-full flex items-center justify-center text-xs font-bold flex-shrink-0 transition-colors ${step > n ? "bg-green-500 text-white" : step === n ? "bg-[#B22234] text-white" : "bg-white/20 text-white/50"}`, children: step > n ? /* @__PURE__ */ jsxRuntimeExports.jsx(CircleCheck, { className: "w-4 h-4" }) : n }),
1587      /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `text-xs hidden sm:block transition-colors ${step === n ? "text-white font-medium" : "text-white/50"}`, children: label }),
1588      n < 4 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `flex-1 h-0.5 rounded ${step > n ? "bg-green-500" : "bg-white/20"}` })
1589    ] }, n)) }) }),
1590    /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "max-w-3xl mx-auto px-4 py-8", children: [
1591      step === 1 && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
1592        /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-center mb-8", children: [
1593          /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-2xl sm:text-3xl font-bold text-white mb-2", children: "What can we help you with?" }),
1594          /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-white/60 text-sm", children: "Choose the category that best describes your request" })
1595        ] }),
1596        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "mb-6", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
1597          "button",
1598          {
1599            onClick: () => {
1600              setSelectedCategory("general");
1601              setSelectedChangeType("cancel_policy");
1602              setStep(2);
1603            },
1604            className: "w-full bg-red-600 hover:bg-red-700 active:bg-red-800 text-white rounded-xl px-6 py-4 flex items-center justify-between transition-all duration-150 hover:shadow-lg hover:-translate-y-0.5 border-2 border-red-500",
1605            children: [
1606              /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-4", children: [
1607                /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-11 h-11 rounded-xl bg-red-500 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CircleX, { className: "w-6 h-6 text-white" }) }),
1608                /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-left", children: [
1609                  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "font-bold text-white text-base leading-tight", children: "Request Policy Cancellation" }),
1610                  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-red-200 text-sm mt-0.5", children: "Cancel one or more of your existing policies" })
1611                ] })
1612              ] }),
1613              /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: "w-5 h-5 text-red-200 flex-shrink-0" })
1614            ]
1615          }
1616        ) }),
1617        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: CATEGORIES.map((cat) => {
1618          const Icon = cat.icon;
1619          return /* @__PURE__ */ jsxRuntimeExports.jsx(
1620            "button",
1621            {
1622              onClick: () => handleCategorySelect(cat.id),
1623              className: `bg-white rounded-xl p-5 border-2 text-left transition-all duration-150 hover:shadow-lg hover:-translate-y-0.5 ${cat.color}`,
1624              children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start gap-4", children: [
1625                /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "w-11 h-11 rounded-xl flex items-center justify-center flex-shrink-0 bg-gray-100", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { className: `w-6 h-6 ${cat.iconColor}` }) }),
1626                /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0", children: [
1627                  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "font-semibold text-gray-900 text-base leading-tight", children: cat.label }),
1628                  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-gray-500 text-sm mt-1 leading-snug", children: cat.description })
1629                ] }),
1630                /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: "w-5 h-5 text-gray-400 flex-shrink-0 mt-1" })
1631              ] })
1632            },
1633            cat.id
1634          );
1635        }) })
1636      ] }),
1637      step === 2 && category && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
1638        /* @__PURE__ */ jsxRuntimeExports.jsxs("button", { onClick: handleBack, className: "flex items-center gap-1.5 text-white/60 hover:text-white text-sm mb-6 transition-colors", children: [
1639          /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronLeft, { className: "w-4 h-4" }),
1640          " Back to categories"
1641        ] }),
1642        /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white rounded-2xl shadow-xl overflow-hidden", children: [
1643          /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `px-6 py-4 border-b ${category.color.replace("hover:border-", "border-").split(" ")[0]} ${category.color.split(" ")[0]}`, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3", children: [
1644            /* @__PURE__ */ jsxRuntimeExports.jsx(category.icon, { className: `w-5 h-5 ${category.iconColor}` }),
1645            /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "font-bold text-gray-900", children: category.label })
1646          ] }) }),
1647          /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-6 space-y-6", children: [
1648            /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
1649              /* @__PURE__ */ jsxRuntimeExports.jsxs(Label, { className: "text-sm font-semibold text-gray-700 mb-3 block", children: [
1650                "What type of change do you need? ",
1651                /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-red-500", children: "*" })
1652              ] }),
1653              /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-2", children: category.changeTypes.map((ct) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1654                "button",
1655                {
1656                  onClick: () => handleChangeTypeSelect(ct.id),
1657                  className: `text-left px-4 py-3 rounded-lg border-2 text-sm font-medium transition-all ${selectedChangeType === ct.id ? `${category.activeColor} text-gray-900` : "border-gray-200 text-gray-700 hover:border-gray-300 hover:bg-gray-50"}`,
1658                  children: ct.label
1659                },
1660                ct.id
1661              )) })
1662            ] }),
1663            selectedChangeType && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "rounded-lg border border-amber-200 bg-amber-50 p-4 space-y-1.5", children: [
1664              /* @__PURE__ */ jsxRuntimeExports.jsxs(Label, { className: "text-sm font-semibold text-amber-900", children: [
1665                "Policy Number ",
1666                requiresPolicyNumber && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-red-600", children: "*" })
1667              ] }),
1668              /* @__PURE__ */ jsxRuntimeExports.jsx(
1669                Input,
1670                {
1671                  value: policyNumber,
1672                  onChange: (e) => setPolicyNumber(e.target.value),
1673                  placeholder: "Enter the policy number shown on your ID card or declaration page",
1674                  className: "bg-white text-sm"
1675                }
1676              ),
1677              /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-amber-800", children: requiresPolicyNumber ? "Required to make sure we update or cancel the correct policy. Submit a separate request for a different policy." : "Optional for a new coverage quote. Enter it only if this request also changes an existing policy." }),
1678              /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "border-t border-amber-200 pt-3 mt-3", children: [
1679                /* @__PURE__ */ jsxRuntimeExports.jsx(
1680                  "input",
1681                  {
1682                    ref: idCardInputRef,
1683                    type: "file",
1684                    accept: "image/jpeg,image/png,image/webp",
1685                    className: "hidden",
1686                    onChange: (e) => handleIdCardFile(e.target.files?.[0])
1687                  }
1688                ),
1689                /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center gap-2", children: [
1690                  /* @__PURE__ */ jsxRuntimeExports.jsxs(
1691                    Button,
1692                    {
1693                      type: "button",
1694                      variant: "outline",
1695                      size: "sm",
1696                      disabled: idCardExtraction.isPending,
1697                      onClick: () => idCardInputRef.current?.click(),
1698                      className: "w-fit gap-1.5 bg-white",
1699                      children: [
1700                        idCardExtraction.isPending ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "w-3.5 h-3.5 animate-spin" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ImageUp, { className: "w-3.5 h-3.5" }),
1701                        idCardExtraction.isPending ? "Reading ID Card…" : "Upload Insurance ID Card (Optional)"
1702                      ]
1703                    }
1704                  ),
1705                  idCardFileName && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 text-xs text-green-800", children: [
1706                    /* @__PURE__ */ jsxRuntimeExports.jsx(CircleCheck, { className: "w-3.5 h-3.5" }),
1707                    /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate max-w-[210px]", children: idCardFileName }),
1708                    /* @__PURE__ */ jsxRuntimeExports.jsx(
1709                      "button",
1710                      {
1711                        type: "button",
1712                        className: "text-red-600 hover:text-red-800 underline",
1713                        onClick: () => {
1714                          setIdCardFileUrl("");
1715                          setIdCardFileName("");
1716                          setIdCardExtractionNote("");
1717                          if (idCardInputRef.current) idCardInputRef.current.value = "";
1718                        },
1719                        children: "Remove"
1720                      }
1721                    )
1722                  ] })
1723                ] }),
1724                /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-amber-800 mt-2", children: "Optional: upload a clear photo of your insurance ID card and we will read the policy number for you. Please review it before submitting." }),
1725                idCardExtractionNote && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs mt-2 font-medium text-amber-900", children: idCardExtractionNote })
1726              ] })
1727            ] }),
1728            selectedChangeType && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "border-t pt-6", children: [
1729              /* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: "font-semibold text-gray-800 mb-4", children: [
1730                changeTypeLabel,
1731                " — Details"
1732              ] }),
1733              /* @__PURE__ */ jsxRuntimeExports.jsx(
1734                ChangeTypeFields,
1735                {
1736                  changeType: selectedChangeType,
1737                  values: changeDetails,
1738                  onChange: handleDetailChange
1739                }
1740              )
1741            ] }),
1742            selectedChangeType && additionalTasks.map((task, idx) => {
1743              const taskCat = CATEGORIES.find((c) => c.id === task.category);
1744              taskCat?.icon ?? FileText;
1745              return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "border-t pt-5 space-y-4", children: [
1746                /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between", children: [
1747                  /* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: "font-semibold text-gray-800 text-sm", children: [
1748                    "Additional Change #",
1749                    idx + 2,
1750                    taskCat && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "ml-2 text-xs font-normal text-gray-500", children: [
1751                      "— ",
1752                      taskCat.label
1753                    ] })
1754                  ] }),
1755                  /* @__PURE__ */ jsxRuntimeExports.jsxs(
1756                    "button",
1757                    {
1758                      type: "button",
1759                      onClick: () => removeTask(idx),
1760                      className: "text-red-500 hover:text-red-700 flex items-center gap-1 text-xs",
1761                      children: [
1762                        /* @__PURE__ */ jsxRuntimeExports.jsx(Trash2, { className: "w-3.5 h-3.5" }),
1763                        " Remove"
1764                      ]
1765                    }
1766                  )
1767                ] }),
1768                /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
1769                  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-gray-500 mb-2 font-medium", children: "Select a category:" }),
1770                  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 gap-2", children: CATEGORIES.map((cat) => {
1771                    const CatIcon = cat.icon;
1772                    return /* @__PURE__ */ jsxRuntimeExports.jsxs(
1773                      "button",
1774                      {
1775                        type: "button",
1776                        onClick: () => updateTaskCategory(idx, cat.id),
1777                        className: `flex items-center gap-2 px-3 py-2.5 rounded-lg border-2 text-sm font-medium transition-all ${task.category === cat.id ? `${cat.activeColor} text-gray-900` : `${cat.color} text-gray-700`}`,
1778                        children: [
1779                          /* @__PURE__ */ jsxRuntimeExports.jsx(CatIcon, { className: `w-4 h-4 flex-shrink-0 ${cat.iconColor}` }),
1780                          /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate text-xs", children: cat.label })
1781                        ]
1782                      },
1783                      cat.id
1784                    );
1785                  }) })
1786                ] }),
1787                task.category && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
1788                  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-gray-500 mb-2 font-medium", children: "Select the type of change:" }),
1789                  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-2", children: taskCat.changeTypes.map((ct) => /* @__PURE__ */ jsxRuntimeExports.jsx(
1790                    "button",
1791                    {
1792                      type: "button",
1793                      onClick: () => updateTaskType(idx, ct.id),
1794                      className: `text-left px-4 py-3 rounded-lg border-2 text-sm font-medium transition-all ${task.changeType === ct.id ? `${taskCat.activeColor} text-gray-900` : "border-gray-200 text-gray-700 hover:border-gray-300 hover:bg-gray-50"}`,
1795                      children: ct.label
1796                    },
1797                    ct.id
1798                  )) })
1799                ] }),
1800                task.changeType && /* @__PURE__ */ jsxRuntimeExports.jsx(
1801                  ChangeTypeFields,
1802                  {
1803                    changeType: task.changeType,
1804                    values: task.changeDetails,
1805                    onChange: (key, val) => updateTaskDetail(idx, key, val)
1806                  }
1807                )
1808              ] }, idx);
1809            }),
1810            selectedChangeType && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "border-t pt-4", children: [
1811              /* @__PURE__ */ jsxRuntimeExports.jsxs(
1812                "button",
1813                {
1814                  type: "button",
1815                  onClick: addTask,
1816                  className: "flex items-center gap-2 text-sm font-medium text-blue-600 hover:text-blue-800 transition-colors",
1817                  children: [
1818                    /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "w-4 h-4" }),
1819                    "Add another change to this request"
1820                  ]
1821                }
1822              ),
1823              /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-gray-400 mt-1", children: "Bundle multiple changes across any category (e.g., remove a vehicle and update your billing method) into one request." })
1824            ] }),
1825            selectedChangeType && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1.5 border-t pt-4", children: [
1826              /* @__PURE__ */ jsxRuntimeExports.jsxs(Label, { className: "text-sm font-medium text-gray-700", children: [
1827                "Anything else your agent should know? ",
1828                /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-gray-400 font-normal", children: "(optional)" })
1829              ] }),
1830              /* @__PURE__ */ jsxRuntimeExports.jsx(
1831                Textarea,
1832                {
1833                  value: additionalNotes,
1834                  onChange: (e) => setAdditionalNotes(e.target.value),
1835                  placeholder: "Any additional context, questions, or special instructions...",
1836                  className: "min-h-[80px] text-sm"
1837                }
1838              )
1839            ] }),
1840            selectedChangeType && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "border-t pt-6 space-y-5", children: [
1841              /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
1842                /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-base font-bold text-gray-900 mb-1", children: "Your Contact Information" }),
1843                /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-gray-500 text-sm", children: "We'll use this to confirm your request and follow up with you." }),
1844                (urlSearchParams.get("name") || urlSearchParams.get("email") || urlSearchParams.get("phone")) && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-2 flex items-center gap-2 bg-green-50 border border-green-200 rounded-lg px-3 py-2 text-xs text-green-700", children: [
1845                  /* @__PURE__ */ jsxRuntimeExports.jsx(CircleCheck, { className: "w-3.5 h-3.5 flex-shrink-0" }),
1846                  "Your contact information has been pre-filled by your agent. Please verify it is correct before submitting."
1847                ] })
1848              ] }),
1849              /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-4", children: [
1850                /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1.5 sm:col-span-2", children: [
1851                  /* @__PURE__ */ jsxRuntimeExports.jsxs(Label, { className: "text-sm font-medium text-gray-700", children: [
1852                    "Full Name ",
1853                    /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-red-500", children: "*" })
1854                  ] }),
1855                  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [
1856                    /* @__PURE__ */ jsxRuntimeExports.jsx(User, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400" }),
1857                    /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { value: clientName, onChange: (e) => setClientName(e.target.value), placeholder: "Your full name", className: "pl-9 text-sm" })
1858                  ] })
1859                ] }),
1860                /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1.5", children: [
1861                  /* @__PURE__ */ jsxRuntimeExports.jsxs(Label, { className: "text-sm font-medium text-gray-700", children: [
1862                    "Email Address ",
1863                    /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-red-500", children: "*" })
1864                  ] }),
1865                  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [
1866                    /* @__PURE__ */ jsxRuntimeExports.jsx(Mail, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400" }),
1867                    /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { type: "email", value: clientEmail, onChange: (e) => setClientEmail(e.target.value), placeholder: "[email protected]", className: "pl-9 text-sm" })
1868                  ] })
1869                ] }),
1870                /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1.5", children: [
1871                  /* @__PURE__ */ jsxRuntimeExports.jsxs(Label, { className: "text-sm font-medium text-gray-700", children: [
1872                    "Cell Phone ",
1873                    /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-red-500", children: "*" })
1874                  ] }),
1875                  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "relative", children: [
1876                    /* @__PURE__ */ jsxRuntimeExports.jsx(Phone, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400" }),
1877                    /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { type: "tel", value: clientPhone, onChange: (e) => setClientPhone(e.target.value), placeholder: "(555) 555-5555", className: "pl-9 text-sm" })
1878                  ] })
1879                ] })
1880              ] }),
1881              /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-1.5", children: [
1882                /* @__P
1882URE__ */ jsxRuntimeExports.jsxs(Label, { className: "text-sm font-medium text-gray-700", children: [
1883                  "Your Insurance Agent ",
1884                  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-red-500", children: "*" })
1885                ] }),
1886                /* @__PURE__ */ jsxRuntimeExports.jsxs(Select, { value: selectedAgentKey, onValueChange: (v) => setSelectedAgentKey(v), children: [
1887                  /* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "text-sm", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, { placeholder: "Select your agent" }) }),
1888                  /* @__PURE__ */ jsxRuntimeExports.jsx(SelectContent, { children: agents?.map((a) => /* @__PURE__ */ jsxRuntimeExports.jsxs(SelectItem, { value: a.agentKey, children: [
1889                    a.agentName,
1890                    a.email ? ` — ${a.email}` : ""
1891                  ] }, a.agentKey)) })
1892                ] })
1893              ] }),
1894              /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between pt-2", children: [
1895                /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { variant: "outline", onClick: handleBack, className: "gap-1.5", children: [
1896                  /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronLeft, { className: "w-4 h-4" }),
1897                  " Back"
1898                ] }),
1899                /* @__PURE__ */ jsxRuntimeExports.jsxs(
1900                  Button,
1901                  {
1902                    onClick: () => {
1903                      if (selectedChangeType === "add_driver") {
1904                        if (!changeDetails["dob"]) {
1905                          toast.error("Please enter the driver's date of birth.");
1906                          return;
1907                        }
1908                        if (!changeDetails["licenseNumber"]?.trim()) {
1909                          toast.error("Please enter the driver's license number.");
1910                          return;
1911                        }
1912                        if (!changeDetails["licenseState"]) {
1913                          toast.error("Please select the driver's license state.");
1914                          return;
1915                        }
1916                        if (!changeDetails["isStudent"]) {
1917                          toast.error("Please indicate whether this driver is a student.");
1918                          return;
1919                        }
1920                        if (changeDetails["isStudent"] === "Yes" && !changeDetails["gpaOver3"]) {
1921                          toast.error("Please answer whether the student has a 3.0 GPA or better.");
1922                          return;
1923                        }
1924                      }
1925                      if (!validateCamperValues()) return;
1926                      if (!clientName.trim()) {
1927                        toast.error("Please enter your full name.");
1928                        return;
1929                      }
1930                      if (!clientEmail.trim() || !clientEmail.includes("@")) {
1931                        toast.error("Please enter a valid email address.");
1932                        return;
1933                      }
1934                      if (!clientPhone.trim()) {
1935                        toast.error("Please enter your cell phone number.");
1936                        return;
1937                      }
1938                      if (!selectedAgentKey) {
1939                        toast.error("Please select your insurance agent.");
1940                        return;
1941                      }
1942                      if (requiresPolicyNumber && !policyNumber.trim()) {
1943                        toast.error("Please enter the policy number so we can update the correct policy.");
1944                        return;
1945                      }
1946                      setStep(4);
1947                    },
1948                    className: "bg-[#B22234] hover:bg-[#8B1A28] text-white gap-1.5 px-6",
1949                    children: [
1950                      "Review My Request ",
1951                      /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRight, { className: "w-4 h-4" })
1952                    ]
1953                  }
1954                )
1955              ] })
1956            ] }),
1957            !selectedChangeType && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex justify-between pt-2", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { variant: "outline", onClick: handleBack, className: "gap-1.5", children: [
1958              /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronLeft, { className: "w-4 h-4" }),
1959              " Back"
1960            ] }) })
1961          ] })
1962        ] })
1963      ] }),
1964      step === 4 && (() => {
1965        const agent = agents?.find((a) => a.agentKey === selectedAgentKey);
1966        const formatKey = (k) => k.replace(/([A-Z])/g, " $1").replace(/_/g, " ").replace(/^./, (s) => s.toUpperCase()).trim();
1967        const detailEntries = Object.entries(changeDetails).filter(([, v]) => v && v.trim() !== "");
1968        return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
1969          /* @__PURE__ */ jsxRuntimeExports.jsxs("button", { onClick: handleBack, className: "flex items-center gap-1.5 text-white/60 hover:text-white text-sm mb-6 transition-colors", children: [
1970            /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronLeft, { className: "w-4 h-4" }),
1971            " Edit my information"
1972          ] }),
1973          /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-white rounded-2xl shadow-xl overflow-hidden", children: [
1974            /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-[#2d2c5a] px-6 py-4 flex items-center justify-between", children: [
1975              /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
1976                /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-white/60 text-xs uppercase tracking-wide mb-0.5", children: "Please review your request" }),
1977                /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-white font-bold text-base", children: [
1978                  category?.label,
1979                  " — ",
1980                  changeTypeLabel,
1981                  additionalTasks.filter((t) => t.changeType).length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "ml-2 text-xs bg-white/20 text-white px-2 py-0.5 rounded-full", children: [
1982                    "+",
1983                    additionalTasks.filter((t) => t.changeType).length,
1984                    " more task",
1985                    additionalTasks.filter((t) => t.changeType).length > 1 ? "s" : ""
1986                  ] })
1987                ] })
1988              ] }),
1989              /* @__PURE__ */ jsxRuntimeExports.jsx(CircleCheck, { className: "w-6 h-6 text-[#B22234]" })
1990            ] }),
1991            /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-6 space-y-6", children: [
1992              (() => {
1993                const allTasks = [
1994                  { catId: selectedCategory ?? "", changeType: selectedChangeType ?? "", label: changeTypeLabel },
1995                  ...additionalTasks.filter((t) => t.changeType).map((t) => ({
1996                    catId: t.category,
1997                    changeType: t.changeType,
1998                    label: CATEGORIES.find((c) => c.id === t.category)?.changeTypes.find((ct) => ct.id === t.changeType)?.label ?? t.changeType
1999                  }))
2000                ];
2001                return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
2002                  /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-3", children: allTasks.length > 1 ? `Request Summary — ${allTasks.length} Changes` : "Request Summary" }),
2003                  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "rounded-xl border border-gray-200 overflow-hidden divide-y divide-gray-100", children: allTasks.map((t, i) => {
2004                    const cat = CATEGORIES.find((c) => c.id === t.catId);
2005                    const CatIcon = cat?.icon ?? FileText;
2006                    return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-3 px-4 py-3 bg-white", children: [
2007                      /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `flex-shrink-0 w-7 h-7 rounded-full flex items-center justify-center text-xs font-bold ${i === 0 ? "bg-[#2d2c5a] text-white" : "bg-gray-100 text-gray-600"}`, children: i + 1 }),
2008                      /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: `flex-shrink-0 p-1.5 rounded-lg ${cat?.color ?? "bg-gray-50 border border-gray-200"}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CatIcon, { className: `w-4 h-4 ${cat?.iconColor ?? "text-gray-500"}` }) }),
2009                      /* @__P
2009URE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0", children: [
2010                        /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-gray-400 leading-none mb-0.5", children: cat?.label ?? "General" }),
2011                        /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-semibold text-gray-900 truncate", children: t.label })
2012                      ] }),
2013                      i === 0 && allTasks.length > 1 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-auto text-xs text-gray-400 flex-shrink-0", children: "Primary" })
2014                    ] }, i);
2015                  }) })
2016                ] });
2017              })(),
2018              policyNumber && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
2019                /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-3", children: "Policy Identification" }),
2020                /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "rounded-xl border border-amber-200 bg-amber-50 px-4 py-3", children: [
2021                  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-amber-700", children: "Policy Number" }),
2022                  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-semibold text-amber-950 break-all", children: policyNumber })
2023                ] })
2024              ] }),
2025              /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
2026                /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-3", children: "Your Contact Information" }),
2027                /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-gray-50 rounded-xl p-4 grid grid-cols-1 sm:grid-cols-2 gap-3", children: [
2028                  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
2029                    /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-gray-400", children: "Full Name" }),
2030                    /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium text-gray-900", children: clientName })
2031                  ] }),
2032                  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
2033                    /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-gray-400", children: "Email Address" }),
2034                    /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium text-gray-900", children: clientEmail })
2035                  ] }),
2036                  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
2037                    /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-gray-400", children: "Cell Phone" }),
2038                    /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium text-gray-900", children: clientPhone })
2039                  ] }),
2040                  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
2041                    /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-gray-400", children: "Confirmation Preference" }),
2042                    /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium text-gray-900 capitalize", children: confirmationPreference === "email" ? "Email" : "Text Message (SMS)" })
2043                  ] }),
2044                  agent && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "sm:col-span-2", children: [
2045                    /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-gray-400", children: "Assigned Agent" }),
2046                    /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "text-sm font-medium text-gray-900", children: [
2047                      agent.agentName,
2048                      agent.email ? ` — ${agent.email}` : ""
2049                    ] })
2050                  ] })
2051                ] })
2052              ] }),
2053              /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
2054                /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-3", children: additionalTasks.filter((t) => t.changeType).length > 0 ? `Task 1: ${changeTypeLabel}` : "Request Details" }),
2055                detailEntries.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-gray-50 rounded-xl p-4 space-y-2", children: detailEntries.map(([k, v]) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-3", children: [
2056                  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-500 min-w-[160px] flex-shrink-0 pt-0.5", children: formatKey(k) }),
2057                  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm text-gray-900 font-medium break-words", children: v })
2058                ] }, k)) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-400 italic", children: "No additional details provided." })
2059              ] }),
2060              additionalTasks.filter((t) => t.changeType).map((task, idx) => {
2061                const taskCatObj = CATEGORIES.find((c) => c.id === task.category);
2062                const taskLabel = taskCatObj?.changeTypes.find((ct) => ct.id === task.changeType)?.label ?? task.changeType;
2063                const taskEntries = Object.entries(task.changeDetails).filter(([, v]) => v && v.trim() !== "");
2064                return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
2065                  /* @__PURE__ */ jsxRuntimeExports.jsxs("h3", { className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-3", children: [
2066                    "Task ",
2067                    idx + 2,
2068                    ": ",
2069                    taskCatObj ? `${taskCatObj.label} — ` : "",
2070                    taskLabel
2071                  ] }),
2072                  taskEntries.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-gray-50 rounded-xl p-4 space-y-2", children: taskEntries.map(([k, v]) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex gap-3", children: [
2073                    /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-xs text-gray-500 min-w-[160px] flex-shrink-0 pt-0.5", children: formatKey(k) }),
2074                    /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm text-gray-900 font-medium break-words", children: v })
2075                  ] }, k)) }) : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-400 italic", children: "No additional details provided." })
2076                ] }, idx);
2077              }),
2078              additionalNotes.trim() && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
2079                /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "text-xs font-semibold text-gray-400 uppercase tracking-wider mb-3", children: "Additional Notes" }),
2080                /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-gray-50 rounded-xl p-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-gray-900 whitespace-pre-wrap", children: additionalNotes.trim() }) })
2081              ] }),
2082              /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-gray-400 border-t pt-4", children: "By submitting this request, you confirm that the information above is accurate. Your agent will be notified immediately and will follow up with you to complete the change." }),
2083              /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between", children: [
2084                /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { variant: "outline", onClick: handleBack, className: "gap-1.5", children: [
2085                  /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronLeft, { className: "w-4 h-4" }),
2086                  " Edit"
2087                ] }),
2088                /* @__PURE__ */ jsxRuntimeExports.jsx(
2089                  Button,
2090                  {
2091                    onClick: handleSubmit,
2092                    disabled: submitMutation.isPending,
2093                    className: "bg-[#B22234] hover:bg-[#b8943d] text-white gap-1.5 px-6",
2094                    children: submitMutation.isPending ? /* @__P
2094URE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
2095                      /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "w-4 h-4 animate-spin" }),
2096                      " Submitting..."
2097                    ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
2098                      /* @__PURE__ */ jsxRuntimeExports.jsx(CircleCheck, { className: "w-4 h-4" }),
2099                      " Confirm & Submit"
2100                    ] })
2101                  }
2102                )
2103              ] })
2104            ] })
2105          ] })
2106        ] });
2107      })()
2108    ] }),
2109    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-center pb-8 px-4", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-white/30 text-xs", children: "Expert Protection Services · Secure Policy Change Request" }) })
2110  ] });
2111}
2112
2113export { PolicyChangeForm as default };

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.