sales-frontend-components 0.0.66 → 0.0.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,13 +1,18 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
1
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
2
  import { useController } from 'react-hook-form';
3
- import { CheckboxButton, Checkbox, DatePicker, DateRangePicker, SegmentGroup, FormField, Icon, Button, Modal, List, ListItem, Segment, Select, Accordion } from 'sales-frontend-design-system';
3
+ import { CheckboxButton, Checkbox, DatePicker, DateRangePicker, Accordion, Radio, Table, Button, FormField, Select, Tab, Icon, useModalState, Modal, SegmentGroup, ModalUtils, List, ListItem, Segment, FormCore, RadioGroup } from 'sales-frontend-design-system';
4
4
  import React, { useState, useEffect, useRef, useCallback, useMemo } from 'react';
5
- import styles from './step-indicator/step-indicator.module.scss';
6
- import styles$1 from './camera/camera.module.scss';
7
- import styles$2 from './debug-tool/debug-tool.module.scss';
5
+ import { useSearchOccupationQuery, useSearchModalAddressQuery, useSearchVehicleQuery } from 'sales-frontend-api/method';
6
+ import styles from './modal/pre-standard/job-search-modal/job-search-modal.module.scss';
7
+ import styles$1 from './step-indicator/step-indicator.module.scss';
8
+ import styles$2 from './camera/camera.module.scss';
9
+ import styles$3 from './debug-tool/debug-tool.module.scss';
8
10
  import { isClient, getEnvironmentFromHostname } from 'sales-frontend-utils';
9
11
  import { useDebugStore } from 'sales-frontend-api';
10
- import styles$3 from './debug-tool/features/network-log/network-log.module.scss';
12
+ import styles$4 from './debug-tool/features/network-log/network-log.module.scss';
13
+ import styles$5 from './modal/standard/address-search/select-address.module.scss';
14
+ import styles$6 from './modal/pre-standard/job-vehicle-search-modal/job-vehicle-search-modal.module.scss';
15
+ import styles$7 from './modal/pre-standard/vehicle-search-modal/vehicle-search-modal.module.scss';
11
16
 
12
17
  const FormCheckboxButton = ({
13
18
  name,
@@ -17,7 +22,21 @@ const FormCheckboxButton = ({
17
22
  ...props
18
23
  }) => {
19
24
  const { field, fieldState } = useController({ name, control, disabled });
20
- return /* @__PURE__ */ jsx(CheckboxButton, { ...props, ...field, id: field.name, checked: field.value, error: fieldState.invalid, children });
25
+ return /* @__PURE__ */ jsx(
26
+ CheckboxButton,
27
+ {
28
+ ...props,
29
+ ...field,
30
+ id: field.name,
31
+ checked: field.value ?? false,
32
+ error: fieldState.invalid,
33
+ onChange: (checked) => {
34
+ field.onChange(checked);
35
+ props.onChange?.(checked);
36
+ },
37
+ children
38
+ }
39
+ );
21
40
  };
22
41
 
23
42
  const FormCheckbox = ({
@@ -95,73 +114,10 @@ const FormDateRangePicker = ({
95
114
  );
96
115
  };
97
116
 
98
- const FormSegmentGroup = ({
99
- name,
100
- control,
101
- disabled,
102
- ...props
103
- }) => {
104
- const { field, fieldState } = useController({ name, control, disabled });
105
- return /* @__PURE__ */ jsx(
106
- SegmentGroup,
107
- {
108
- ...props,
109
- tabIndex: 0,
110
- id: field.name,
111
- ref: field.ref,
112
- defaultValue: field.value,
113
- disabled: field.disabled,
114
- error: fieldState.invalid,
115
- onBlur: field.onBlur,
116
- onValueChange: (selected) => {
117
- field.onChange(selected);
118
- props.onValueChange?.(selected);
119
- }
120
- }
121
- );
122
- };
123
-
124
- const FormTextField = ({
125
- name,
126
- control,
127
- size = "medium",
128
- disabled,
129
- error,
130
- onBlur,
131
- onChange,
132
- rootProps,
133
- ...props
134
- }) => {
135
- const { field, fieldState } = useController({ name, control, disabled });
136
- return /* @__PURE__ */ jsx(
137
- FormField.TextField,
138
- {
139
- ...props,
140
- id: field.name,
141
- size,
142
- autoComplete: "off",
143
- name: field.name,
144
- value: field.value ?? "",
145
- disabled: field.disabled,
146
- error: fieldState.invalid || error,
147
- onChange: (e) => {
148
- field.onChange(e);
149
- onChange?.(e);
150
- },
151
- onBlur: (e) => {
152
- field.onBlur();
153
- onBlur?.(e);
154
- },
155
- rootProps: {
156
- ...rootProps,
157
- onClear: () => {
158
- field.onChange("");
159
- rootProps?.onClear?.();
160
- }
161
- }
162
- }
163
- );
164
- };
117
+ const JOB_SEARCH_TABS = [
118
+ { value: "jobName", label: "\uC9C1\uC885\uBA85 \uAC80\uC0C9" },
119
+ { value: "jobCode", label: "\uBD84\uB958\uB85C \uAC80\uC0C9" }
120
+ ];
165
121
 
166
122
  function getDefaultExportFromCjs (x) {
167
123
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -254,39 +210,671 @@ function requireBind () {
254
210
  var bindExports = requireBind();
255
211
  var classNames = /*@__PURE__*/getDefaultExportFromCjs(bindExports);
256
212
 
257
- const cx$1 = classNames.bind(styles);
213
+ const highlightOnSearchKeyword = (originalText, targetString) => {
214
+ if (originalText?.includes(targetString)) {
215
+ const replacedText = [];
216
+ const splitText = originalText.split(targetString);
217
+ for (let i = 0; i < splitText.length; i++) {
218
+ replacedText.push(splitText[i]);
219
+ if (i !== splitText.length - 1) {
220
+ replacedText.push(/* @__PURE__ */ jsx("span", { className: "text-primary", children: targetString }));
221
+ }
222
+ }
223
+ return replacedText;
224
+ }
225
+ return originalText;
226
+ };
227
+
228
+ const cx$9 = classNames.bind(styles);
229
+ function JobSearchCategory({ filteredJobs, onJobSelect, searchTerm }) {
230
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: cx$9("category-section"), children: [
231
+ /* @__PURE__ */ jsxs("p", { className: cx$9("result-title"), children: [
232
+ "\uCD1D ",
233
+ /* @__PURE__ */ jsx("span", { className: "text-primary", children: filteredJobs.length }),
234
+ "\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
235
+ ] }),
236
+ /* @__PURE__ */ jsx(Accordion.Root, { children: /* @__PURE__ */ jsx(Radio.Root, { name: "job-selection", size: "small", className: cx$9("job-radio-root"), onToggle: () => {
237
+ }, children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxs(
238
+ Accordion.Item,
239
+ {
240
+ id: `item-${job.occupationIndustryCode}-${index}-accordion`,
241
+ children: [
242
+ /* @__PURE__ */ jsx(Accordion.HeaderDiv, { children: /* @__PURE__ */ jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsxs(Radio.Item, { size: "small", value: job.occupationIndustryCode, onChange: () => onJobSelect(job), children: [
243
+ highlightOnSearchKeyword(job.occupationIndustryName, searchTerm),
244
+ "(",
245
+ job.occupationIndustryCode,
246
+ ")"
247
+ ] }) }) }),
248
+ /* @__PURE__ */ jsx(Accordion.Content, { variant: "text", children: /* @__PURE__ */ jsx(Table, { variant: "horizontal", children: /* @__PURE__ */ jsxs("tbody", { children: [
249
+ /* @__PURE__ */ jsxs("tr", { children: [
250
+ /* @__PURE__ */ jsx("th", { children: "\uD5E4\uB354 1" }),
251
+ /* @__PURE__ */ jsx("td", { className: "px-24", children: "1\uD589 1\uBC88\uC9F8" }),
252
+ /* @__PURE__ */ jsx("th", { children: "\uD5E4\uB354 1-2" }),
253
+ /* @__PURE__ */ jsx("td", { className: "px-24 ", children: "1\uD589 2\uBC88\uC9F8" })
254
+ ] }),
255
+ /* @__PURE__ */ jsxs("tr", { children: [
256
+ /* @__PURE__ */ jsx("th", { children: "\uD5E4\uB354 2" }),
257
+ /* @__PURE__ */ jsx("td", { className: "pl-24 pr-16", colSpan: 3, children: /* @__PURE__ */ jsxs("p", { className: "d-flex-center-center", children: [
258
+ "2\uD589 1\uBC88\uC9F8 ",
259
+ /* @__PURE__ */ jsx("span", { className: "flex-1 pipe-left", children: "\uC11C\uBE0C\uD14D\uC2A4\uD2B8" }),
260
+ /* @__PURE__ */ jsx(Button, { variant: "neutral", size: "xsmall", appearance: "outline", children: "\uBC84\uD2BC\uBA85" })
261
+ ] }) })
262
+ ] })
263
+ ] }) }) })
264
+ ]
265
+ },
266
+ `item-${job.occupationIndustryCode}-${index}`
267
+ )) }) }),
268
+ filteredJobs.length === 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
269
+ "`",
270
+ /* @__PURE__ */ jsx("span", { className: "text-primary", children: searchTerm }),
271
+ "`\uC5D0 \uB300\uD55C \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."
272
+ ] })
273
+ ] }) });
274
+ }
275
+
276
+ const cx$8 = classNames.bind(styles);
277
+ function JobSearchFavorite({ filteredJobs, onJobSelect }) {
278
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: cx$8("popular-jobs"), children: [
279
+ /* @__PURE__ */ jsx("p", { children: "\uB9CE\uC774 \uCC3E\uB294 \uC9C1\uC885" }),
280
+ /* @__PURE__ */ jsx(Accordion.Root, { children: /* @__PURE__ */ jsx(Radio.Root, { name: "job-selection", size: "small", className: cx$8("job-radio-root"), children: filteredJobs.map((job, index) => /* @__PURE__ */ jsxs(
281
+ Accordion.Item,
282
+ {
283
+ id: `item-${job.occupationIndustryCode}-${index}`,
284
+ className: cx$8("accordion-item"),
285
+ children: [
286
+ /* @__PURE__ */ jsx(Accordion.HeaderDiv, { className: cx$8("accordion-header-item"), children: /* @__PURE__ */ jsxs(
287
+ Radio.Item,
288
+ {
289
+ size: "small",
290
+ value: job.occupationIndustryCode,
291
+ onChange: () => onJobSelect(job),
292
+ className: cx$8("radio-item"),
293
+ children: [
294
+ job.occupationIndustryName,
295
+ "(",
296
+ job.occupationIndustryCode,
297
+ ")"
298
+ ]
299
+ }
300
+ ) }),
301
+ /* @__PURE__ */ jsx(Accordion.Content, { variant: "text", children: "\uD56D\uBAA9 1 \uB0B4\uC6A9" })
302
+ ]
303
+ },
304
+ `item-${job.occupationIndustryCode}-${index}`
305
+ )) }) })
306
+ ] }) });
307
+ }
308
+
309
+ const cx$7 = classNames.bind(styles);
310
+ function JobSearchResult({ filteredJobs, onJobSelect, searchTerm }) {
311
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: cx$7("popular-jobs"), children: [
312
+ /* @__PURE__ */ jsxs("p", { className: cx$7("result-title"), children: [
313
+ "\uCD1D ",
314
+ /* @__PURE__ */ jsx("span", { className: "text-primary", children: filteredJobs.length }),
315
+ "\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
316
+ ] }),
317
+ /* @__PURE__ */ jsx(Accordion.Root, { children: /* @__PURE__ */ jsx(Radio.Root, { name: "job-selection", size: "small", className: cx$7("job-radio-root"), children: filteredJobs.map((job) => /* @__PURE__ */ jsxs(
318
+ Accordion.Item,
319
+ {
320
+ id: `item-${job.occupationIndustryCode}`,
321
+ children: [
322
+ /* @__PURE__ */ jsx(Accordion.HeaderDiv, { children: /* @__PURE__ */ jsx("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsx(
323
+ Radio.Item,
324
+ {
325
+ id: `item-${job.occupationIndustryCode}`,
326
+ size: "small",
327
+ value: job.occupationIndustryCode,
328
+ onChange: () => {
329
+ onJobSelect(job);
330
+ },
331
+ children: highlightOnSearchKeyword(job.occupationIndustryName, searchTerm)
332
+ }
333
+ ) }) }),
334
+ /* @__PURE__ */ jsx(Accordion.Content, { variant: "text", children: /* @__PURE__ */ jsx(Table, { variant: "horizontal", children: /* @__PURE__ */ jsxs("tbody", { children: [
335
+ /* @__PURE__ */ jsxs("tr", { children: [
336
+ /* @__PURE__ */ jsx("th", { children: "\uD5E4\uB354 1" }),
337
+ /* @__PURE__ */ jsx("td", { className: "px-24", children: "1\uD589 1\uBC88\uC9F8" }),
338
+ /* @__PURE__ */ jsx("th", { children: "\uD5E4\uB354 1-2" }),
339
+ /* @__PURE__ */ jsx("td", { className: "px-24 ", children: "1\uD589 2\uBC88\uC9F8" })
340
+ ] }),
341
+ /* @__PURE__ */ jsxs("tr", { children: [
342
+ /* @__PURE__ */ jsx("th", { children: "\uD5E4\uB354 2" }),
343
+ /* @__PURE__ */ jsx("td", { className: "pl-24 pr-16", colSpan: 3, children: /* @__PURE__ */ jsxs("p", { className: "d-flex-center-center", children: [
344
+ "2\uD589 1\uBC88\uC9F8 ",
345
+ /* @__PURE__ */ jsx("span", { className: "flex-1 pipe-left", children: "\uC11C\uBE0C\uD14D\uC2A4\uD2B8" }),
346
+ /* @__PURE__ */ jsx(Button, { variant: "neutral", size: "xsmall", appearance: "outline", children: "\uBC84\uD2BC\uBA85" })
347
+ ] }) })
348
+ ] })
349
+ ] }) }) })
350
+ ]
351
+ },
352
+ job.occupationIndustryCode
353
+ )) }) }),
354
+ filteredJobs.length === 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
355
+ "`",
356
+ /* @__PURE__ */ jsx("span", { className: "text-primary", children: searchTerm }),
357
+ "`\uC5D0 \uB300\uD55C \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."
358
+ ] })
359
+ ] }) });
360
+ }
361
+
362
+ const { TextField } = FormField;
363
+ const cx$6 = classNames.bind(styles);
364
+ const { Option } = Select;
365
+ function JobSearch({
366
+ activeTab,
367
+ onTabChange,
368
+ searchTerm,
369
+ setSearchInput,
370
+ filteredJobs,
371
+ onJobSelect,
372
+ setSearchTerm,
373
+ searchInput,
374
+ firstCategory,
375
+ setFirstCategory,
376
+ secondCategory,
377
+ setSecondCategory,
378
+ firstCategoryList,
379
+ secondCategoryList
380
+ }) {
381
+ const onKeyUp = (e) => {
382
+ if (e.key === "Enter") {
383
+ setSearchTerm(searchInput);
384
+ }
385
+ };
386
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
387
+ /* @__PURE__ */ jsx(
388
+ Tab.Root,
389
+ {
390
+ defaultValue: activeTab,
391
+ onValueChange: onTabChange,
392
+ scroll: "fixed",
393
+ size: "small",
394
+ variant: "sub",
395
+ style: { gap: 0, overflow: "visible" },
396
+ children: JOB_SEARCH_TABS.map((tab) => /* @__PURE__ */ jsx(Tab.Item, { value: tab.value, children: tab.label }, tab.value))
397
+ }
398
+ ),
399
+ /* @__PURE__ */ jsxs("div", { children: [
400
+ activeTab === "jobName" && /* @__PURE__ */ jsxs("div", { className: cx$6("favorite-jobs-section"), children: [
401
+ /* @__PURE__ */ jsx(
402
+ TextField,
403
+ {
404
+ placeholder: "\uC9C1\uC885\uBA85 \uAC80\uC0C9",
405
+ value: searchInput,
406
+ onKeyUp,
407
+ onChange: (e) => setSearchInput(e.target.value),
408
+ className: styles.searchInput,
409
+ size: "medium",
410
+ rootProps: {
411
+ endElement: /* @__PURE__ */ jsx(Icon, { name: "sub-ui/search", onClick: () => setSearchTerm(searchInput) }),
412
+ onClear: () => {
413
+ setSearchTerm("");
414
+ setSearchInput("");
415
+ }
416
+ }
417
+ }
418
+ ),
419
+ !searchTerm && /* @__PURE__ */ jsx(JobSearchFavorite, { filteredJobs, onJobSelect }),
420
+ searchTerm && /* @__PURE__ */ jsx(JobSearchResult, { filteredJobs, onJobSelect, searchTerm })
421
+ ] }),
422
+ activeTab === "jobCode" && /* @__PURE__ */ jsxs("div", { className: cx$6("select-jobs-section"), children: [
423
+ /* @__PURE__ */ jsxs("div", { className: cx$6("category-section"), children: [
424
+ /* @__PURE__ */ jsx(
425
+ Select,
426
+ {
427
+ name: "first_category",
428
+ onChange: (value) => {
429
+ setFirstCategory(value);
430
+ setSecondCategory("");
431
+ },
432
+ placeholder: "\uB300\uBD84\uB958 \uC120\uD0DD",
433
+ rootProps: {
434
+ style: {
435
+ // width: '300px'
436
+ }
437
+ },
438
+ size: "large",
439
+ value: firstCategory,
440
+ children: firstCategoryList.map((option, index) => /* @__PURE__ */ jsx(Option, { value: option.occupationIndustryCode, children: option.occupationIndustryName }, `${index}-${option.occupationIndustryCode}`))
441
+ }
442
+ ),
443
+ /* @__PURE__ */ jsx(
444
+ Select,
445
+ {
446
+ name: "second_category",
447
+ onChange: setSecondCategory,
448
+ placeholder: "\uC911\uBD84\uB958 \uC120\uD0DD",
449
+ rootProps: {
450
+ style: {
451
+ // width: '300px'
452
+ }
453
+ },
454
+ size: "large",
455
+ value: secondCategory,
456
+ disabled: !firstCategory,
457
+ children: secondCategoryList.map((option, index) => /* @__PURE__ */ jsx(Option, { value: option.occupationIndustryCode, children: option.occupationIndustryName }, `${index}-${option.occupationIndustryCode}`))
458
+ }
459
+ )
460
+ ] }),
461
+ firstCategory && secondCategory && /* @__PURE__ */ jsx(JobSearchCategory, { filteredJobs, onJobSelect, searchTerm })
462
+ ] })
463
+ ] })
464
+ ] });
465
+ }
466
+
467
+ const initData = [
468
+ {
469
+ occupationIndustryCode: "430101",
470
+ occupationIndustryName: "\uD68C\uC0AC \uC0AC\uBB34\uC9C1 \uC885\uC0AC\uC790",
471
+ occupationTypeCode: null,
472
+ historySequence: 0
473
+ },
474
+ {
475
+ occupationIndustryCode: "400301",
476
+ occupationIndustryName: "\uACBD\uC601\uC9C0\uC6D0 \uC0AC\uBB34\uC9C1 \uAD00\uB9AC\uC790",
477
+ occupationTypeCode: null,
478
+ historySequence: 0
479
+ },
480
+ {
481
+ occupationIndustryCode: "510201",
482
+ occupationIndustryName: "\uC804\uC5C5\uC8FC\uBD80",
483
+ occupationTypeCode: null,
484
+ historySequence: 0
485
+ },
486
+ {
487
+ occupationIndustryCode: "442501",
488
+ occupationIndustryName: "\uC8FC\uBC29\uC7A5 \uBC0F \uC870\uB9AC\uC0AC(\uC120\uBC15 \uC870\uB9AC\uC0AC \uC81C\uC678)",
489
+ occupationTypeCode: null,
490
+ historySequence: 0
491
+ },
492
+ {
493
+ occupationIndustryCode: "450303",
494
+ occupationIndustryName: "\uBCF4\uD5D8\uC124\uACC4\uC0AC(\uB2F9\uC0AC)",
495
+ occupationTypeCode: null,
496
+ historySequence: 0
497
+ }
498
+ ];
499
+ const useJobSearch = () => {
500
+ const [activeTab, setActiveTab] = useState(JOB_SEARCH_TABS[0]?.value ?? "");
501
+ const [selectedJob, setSelectedJob] = useState(null);
502
+ const [searchTerm, setSearchTerm] = useState("");
503
+ const [searchInput, setSearchInput] = useState("");
504
+ const handleJobSelect = (job) => {
505
+ setSelectedJob(job);
506
+ };
507
+ const [firstCategory, setFirstCategory] = useState("");
508
+ const [secondCategory, setSecondCategory] = useState("");
509
+ const [jobList, setJobList] = useState(initData);
510
+ const [firstCategoryList, setFirstCategoryList] = useState([]);
511
+ const [secondCategoryList, setSecondCategoryList] = useState([]);
512
+ const { data } = useSearchOccupationQuery({
513
+ occupationMajorCategoryCode: firstCategory,
514
+ occupationSearchTypeCode: searchTerm ? "4" : "3",
515
+ occupationSubCategoryCode: secondCategory,
516
+ searchOccupationIndustryName: searchTerm
517
+ });
518
+ const { data: firstCategoryData } = useSearchOccupationQuery({
519
+ occupationMajorCategoryCode: "",
520
+ occupationSearchTypeCode: "1",
521
+ occupationSubCategoryCode: "",
522
+ searchOccupationIndustryName: ""
523
+ });
524
+ const { data: secondCategoryData } = useSearchOccupationQuery({
525
+ occupationMajorCategoryCode: firstCategory,
526
+ occupationSearchTypeCode: "2",
527
+ occupationSubCategoryCode: "",
528
+ searchOccupationIndustryName: ""
529
+ });
530
+ useEffect(() => {
531
+ if (data && searchTerm && activeTab === "jobName") {
532
+ const filteredJobs = data.data.occupationList.filter((job) => job.occupationIndustryName.includes(searchTerm));
533
+ setJobList(filteredJobs);
534
+ } else if (!data && searchTerm && activeTab === "jobName") {
535
+ setJobList([]);
536
+ } else if (!searchTerm && activeTab === "jobName") {
537
+ setJobList(initData);
538
+ } else if (activeTab === "jobCode" && firstCategory && secondCategory) {
539
+ setJobList(data?.data.occupationList || []);
540
+ }
541
+ }, [searchTerm, data, firstCategory, secondCategory, secondCategoryData, activeTab]);
542
+ useEffect(() => {
543
+ console.log("jobList", jobList);
544
+ }, [jobList]);
545
+ useEffect(() => {
546
+ if (firstCategoryData) {
547
+ setFirstCategoryList(firstCategoryData.data.occupationList);
548
+ }
549
+ }, [firstCategoryData]);
550
+ useEffect(() => {
551
+ if (secondCategoryData) {
552
+ setSecondCategoryList(secondCategoryData.data.occupationList);
553
+ }
554
+ }, [secondCategoryData]);
555
+ return {
556
+ activeTab,
557
+ setActiveTab,
558
+ selectedJob,
559
+ searchTerm,
560
+ setSearchTerm,
561
+ handleJobSelect,
562
+ filteredJobs: jobList,
563
+ searchInput,
564
+ setSearchInput,
565
+ firstCategory,
566
+ setFirstCategory,
567
+ secondCategory,
568
+ setSecondCategory,
569
+ secondCategoryList,
570
+ firstCategoryList
571
+ };
572
+ };
573
+ function useJobSearchModal() {
574
+ const {
575
+ activeTab,
576
+ setActiveTab,
577
+ searchTerm,
578
+ setSearchTerm,
579
+ filteredJobs,
580
+ handleJobSelect,
581
+ selectedJob,
582
+ searchInput,
583
+ setSearchInput,
584
+ firstCategory,
585
+ setFirstCategory,
586
+ secondCategory,
587
+ setSecondCategory,
588
+ firstCategoryList,
589
+ secondCategoryList
590
+ } = useJobSearch();
591
+ const { isOpen, openModal, closeModal } = useModalState();
592
+ const onTabChange = (value) => {
593
+ setSearchTerm("");
594
+ setFirstCategory("");
595
+ setSecondCategory("");
596
+ setActiveTab(value);
597
+ };
598
+ return {
599
+ JobSearchModal: /* @__PURE__ */ jsxs(Modal.Root, { isOpen, onClose: closeModal, modalSize: "xlarge", children: [
600
+ /* @__PURE__ */ jsx(Modal.Overlay, {}),
601
+ /* @__PURE__ */ jsxs(Modal.Content, { style: { height: "697px" }, children: [
602
+ /* @__PURE__ */ jsx(Modal.Header, { headerTitle: "\uC9C1\uC885 \uAC80\uC0C9", showCloseButton: true }),
603
+ /* @__PURE__ */ jsx(Modal.Body, { raw: true, children: /* @__PURE__ */ jsx(
604
+ JobSearch,
605
+ {
606
+ firstCategory,
607
+ firstCategoryList,
608
+ secondCategoryList,
609
+ setFirstCategory,
610
+ secondCategory,
611
+ activeTab,
612
+ onTabChange,
613
+ searchTerm,
614
+ setSearchInput,
615
+ filteredJobs: filteredJobs || [],
616
+ onJobSelect: handleJobSelect,
617
+ searchInput,
618
+ setSearchTerm,
619
+ setSecondCategory
620
+ }
621
+ ) }),
622
+ /* @__PURE__ */ jsx(Modal.Footer, { children: /* @__PURE__ */ jsx(Button, { variant: "primary", size: "medium", appearance: "filled", width: "full", onClick: closeModal, children: "\uD655\uC778" }) })
623
+ ] })
624
+ ] }),
625
+ JobSearchComponent: /* @__PURE__ */ jsx(
626
+ JobSearch,
627
+ {
628
+ firstCategoryList,
629
+ secondCategoryList,
630
+ firstCategory,
631
+ setFirstCategory,
632
+ secondCategory,
633
+ setSecondCategory,
634
+ activeTab,
635
+ onTabChange,
636
+ searchTerm,
637
+ setSearchInput,
638
+ filteredJobs: filteredJobs || [],
639
+ onJobSelect: handleJobSelect,
640
+ searchInput,
641
+ setSearchTerm
642
+ }
643
+ ),
644
+ isJobSearchOpen: isOpen,
645
+ openJobSearchModal: openModal,
646
+ closeJobSearchModal: closeModal,
647
+ selectedJob
648
+ };
649
+ }
650
+
651
+ const FormSearchJobField = ({
652
+ name,
653
+ control,
654
+ disabled,
655
+ rootProps,
656
+ error,
657
+ size = "medium",
658
+ placeholder = "\uC9C1\uC885 \uAC80\uC0C9",
659
+ ...props
660
+ }) => {
661
+ const [selected, setSelected] = useState();
662
+ const { field, fieldState } = useController({ name, control, disabled });
663
+ const { JobSearchModal, openJobSearchModal, selectedJob } = useJobSearchModal();
664
+ useEffect(() => {
665
+ if (selectedJob) {
666
+ setSelected(selectedJob);
667
+ field.onChange(selectedJob.occupationIndustryCode);
668
+ props.onValueChange?.(selectedJob);
669
+ }
670
+ }, [selectedJob]);
671
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
672
+ /* @__PURE__ */ jsx(
673
+ FormField.TextField,
674
+ {
675
+ ...props,
676
+ ...field,
677
+ id: field.name,
678
+ error: fieldState.invalid || error,
679
+ value: selected?.occupationIndustryName ?? "",
680
+ rootProps: {
681
+ ...rootProps,
682
+ endElement: /* @__PURE__ */ jsx(Icon, { name: "sub-ui/search" })
683
+ },
684
+ readOnly: true,
685
+ size,
686
+ placeholder,
687
+ style: { background: "#fff", cursor: "pointer" },
688
+ autoComplete: "off",
689
+ onClick: openJobSearchModal
690
+ }
691
+ ),
692
+ JobSearchModal
693
+ ] });
694
+ };
695
+
696
+ const FormSegmentGroup = ({
697
+ name,
698
+ control,
699
+ disabled,
700
+ disabledItems,
701
+ items,
702
+ ...props
703
+ }) => {
704
+ const { field, fieldState } = useController({ name, control, disabled });
705
+ const itemList = items.map((item) => {
706
+ return {
707
+ ...item,
708
+ disabled: disabledItems?.includes(item.value)
709
+ };
710
+ });
711
+ return /* @__PURE__ */ jsx(
712
+ SegmentGroup,
713
+ {
714
+ ...props,
715
+ tabIndex: 0,
716
+ id: field.name,
717
+ ref: field.ref,
718
+ defaultValue: field.value,
719
+ disabled: field.disabled,
720
+ error: fieldState.invalid,
721
+ onBlur: field.onBlur,
722
+ items: itemList,
723
+ onValueChange: (selected) => {
724
+ field.onChange(selected);
725
+ props.onValueChange?.(selected);
726
+ }
727
+ }
728
+ );
729
+ };
730
+
731
+ const FormSelect = ({
732
+ name,
733
+ control,
734
+ disabled,
735
+ error,
736
+ children,
737
+ ...props
738
+ }) => {
739
+ const { field, fieldState } = useController({ name, control, disabled });
740
+ return /* @__PURE__ */ jsx(
741
+ Select,
742
+ {
743
+ ...props,
744
+ id: field.name,
745
+ disabled: field.disabled,
746
+ error: fieldState.invalid || error,
747
+ onBlur: field.onBlur,
748
+ value: field.value,
749
+ onChange: (selected) => {
750
+ field.onChange(selected);
751
+ },
752
+ children
753
+ }
754
+ );
755
+ };
756
+ const FormSelectOption = ({ children, value, ...rest }) => {
757
+ return /* @__PURE__ */ jsx(Select.Option, { value, ...rest, children });
758
+ };
759
+ const FormSelectGroup = ({
760
+ options,
761
+ optionsProps,
762
+ ...props
763
+ }) => {
764
+ return /* @__PURE__ */ jsx(FormSelect, { ...props, children: options.map((option) => /* @__PURE__ */ jsx(FormSelectOption, { value: option.value, ...optionsProps, children: option.label }, option.value)) });
765
+ };
766
+ FormSelect.Option = FormSelectOption;
767
+ FormSelect.Group = FormSelectGroup;
768
+
769
+ const FormTextField = ({
770
+ name,
771
+ control,
772
+ size = "medium",
773
+ disabled,
774
+ error,
775
+ onBlur,
776
+ onChange,
777
+ rootProps,
778
+ ...props
779
+ }) => {
780
+ const { field, fieldState } = useController({ name, control, disabled });
781
+ return /* @__PURE__ */ jsx(
782
+ FormField.TextField,
783
+ {
784
+ ...props,
785
+ id: field.name,
786
+ size,
787
+ autoComplete: "off",
788
+ name: field.name,
789
+ value: field.value ?? "",
790
+ disabled: field.disabled,
791
+ error: fieldState.invalid || error,
792
+ onChange: (e) => {
793
+ field.onChange(e);
794
+ onChange?.(e);
795
+ },
796
+ onBlur: (e) => {
797
+ field.onBlur();
798
+ onBlur?.(e);
799
+ },
800
+ rootProps: {
801
+ ...rootProps,
802
+ onClear: () => {
803
+ field.onChange("");
804
+ rootProps?.onClear?.();
805
+ }
806
+ }
807
+ }
808
+ );
809
+ };
810
+
811
+ const cx$5 = classNames.bind(styles$1);
258
812
  const StepIndicator = ({
259
813
  items,
260
814
  onClickItem,
261
815
  currentIndex = 0,
262
816
  defaultValue = "",
263
- dotCount = 3
817
+ dotCount = 3,
818
+ isLoading
264
819
  }) => {
820
+ const [steps, setSteps] = React.useState(
821
+ Array.from({ length: 10 }).map(() => ({ label: "-", value: "" }))
822
+ );
265
823
  const [current, setCurrent] = React.useState(currentIndex);
266
824
  React.useEffect(() => {
267
- items.map((item, idx) => {
268
- if (item.value === defaultValue) {
269
- setCurrent(idx);
270
- }
271
- });
825
+ if (items.length > 0) {
826
+ setSteps(items);
827
+ items.map((item, idx) => {
828
+ if (item.value === defaultValue) {
829
+ setCurrent(idx);
830
+ }
831
+ });
832
+ }
272
833
  }, [items, defaultValue]);
273
- return /* @__PURE__ */ jsxs("div", { className: cx$1("stepper-layout"), children: [
274
- /* @__PURE__ */ jsx("div", { className: cx$1("stepper"), children: items.map((item, idx) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
834
+ const handleClickStep = (item) => {
835
+ const index = steps.findIndex((step) => step.value === item.value);
836
+ if (index === -1) {
837
+ console.error("error not found index");
838
+ return;
839
+ }
840
+ if (steps[index < 1 ? index : index - 1]?.isCompleted) {
841
+ onClickItem?.(item);
842
+ } else {
843
+ ModalUtils.alert("\uC774\uC804 \uB2E8\uACC4\uB97C \uBAA8\uB450 \uC644\uB8CC\uD574\uC57C \uC120\uD0DD\uD55C \uB2E8\uACC4\uB85C\n\uC774\uB3D9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.", "\uC774\uC804 \uB2E8\uACC4\uB97C \uBA3C\uC800 \uC9C4\uD589\uD574\uC8FC\uC138\uC694");
844
+ }
845
+ };
846
+ return /* @__PURE__ */ jsxs("div", { className: cx$5("stepper-layout", { loading: isLoading }), children: [
847
+ /* @__PURE__ */ jsx("div", { className: cx$5("stepper"), children: steps.map((item, idx) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
275
848
  /* @__PURE__ */ jsx(
276
849
  "div",
277
850
  {
278
- className: cx$1("circle", (defaultValue === item.value || current === idx) && "active"),
279
- onClick: () => onClickItem?.(item),
280
- children: item.isCompleted || idx < current ? /* @__PURE__ */ jsx("span", { className: cx$1("completed") }) : ++idx
851
+ className: cx$5(
852
+ "circle",
853
+ { completed: item.isCompleted ?? false },
854
+ { active: defaultValue === item.value || current === idx }
855
+ ),
856
+ onClick: () => handleClickStep?.(item),
857
+ children: item.isCompleted ? /* @__PURE__ */ jsx("span", { className: cx$5("completed-icon") }) : idx + 1
281
858
  }
282
859
  ),
283
- idx < items.length && Array.from({ length: dotCount }).map((_, dotIdx) => /* @__PURE__ */ jsx("span", { className: cx$1("dot") }, `dot-${idx}-${dotIdx}`))
860
+ idx < steps.length - 1 && Array.from({ length: dotCount }).map((_, dotIdx) => /* @__PURE__ */ jsx("span", { className: cx$5("dot") }, `dot-${idx}-${dotIdx}`))
284
861
  ] }, `num-${idx}`)) }),
285
- /* @__PURE__ */ jsx("ul", { className: cx$1("step-labels"), children: items.map((item, idx) => /* @__PURE__ */ jsx("li", { className: cx$1((defaultValue === item.value || current === idx) && "active"), children: /* @__PURE__ */ jsx("span", { children: item.label ?? item.value }) }, `label-${idx}`)) })
862
+ /* @__PURE__ */ jsx("ul", { className: cx$5("step-labels"), children: steps.map((item, idx) => /* @__PURE__ */ jsx(
863
+ "li",
864
+ {
865
+ className: cx$5(
866
+ { completed: steps[idx < 1 ? idx : idx - 1]?.isCompleted ?? false },
867
+ { active: defaultValue === item.value || current === idx }
868
+ ),
869
+ onClick: () => handleClickStep?.(item),
870
+ children: /* @__PURE__ */ jsx("span", { className: "text-ellipsis", children: item.label ?? item.value })
871
+ },
872
+ `label-${idx}`
873
+ )) })
286
874
  ] });
287
875
  };
288
876
 
289
- const cx = classNames.bind(styles$1);
877
+ const cx$4 = classNames.bind(styles$2);
290
878
  function Attachment({
291
879
  photos,
292
880
  onAddPhoto,
@@ -303,14 +891,14 @@ function Attachment({
303
891
  };
304
892
  const renderPhotoSingle = () => {
305
893
  if (photos.length === 0) {
306
- return /* @__PURE__ */ jsx("div", { className: cx("single-photo-item", "add-photo-item"), children: /* @__PURE__ */ jsxs("button", { className: cx("add-photo-button-single"), onClick: handleAddPhoto, children: [
894
+ return /* @__PURE__ */ jsx("div", { className: cx$4("single-photo-item", "add-photo-item"), children: /* @__PURE__ */ jsxs("button", { className: cx$4("add-photo-button-single"), onClick: handleAddPhoto, children: [
307
895
  /* @__PURE__ */ jsx(Icon, { name: "illust/camera" }),
308
896
  /* @__PURE__ */ jsx("span", { children: buttonText || "\uC0AC\uC9C4 \uCCA8\uBD80\uD558\uAE30" })
309
897
  ] }) });
310
898
  }
311
- return photos.map((photo) => /* @__PURE__ */ jsxs("div", { className: cx("single-photo-item"), children: [
312
- /* @__PURE__ */ jsx("div", { className: cx("photo-placeholder"), children: /* @__PURE__ */ jsx("img", { src: photo.src, alt: photo.name, className: cx("photo-image") }) }),
313
- /* @__PURE__ */ jsx("button", { className: cx("remove-button"), onClick: () => handleRemovePhoto(photo.id), "aria-label": "\uC0AC\uC9C4 \uC0AD\uC81C", children: "\xD7" })
899
+ return photos.map((photo) => /* @__PURE__ */ jsxs("div", { className: cx$4("single-photo-item"), children: [
900
+ /* @__PURE__ */ jsx("div", { className: cx$4("photo-placeholder"), children: /* @__PURE__ */ jsx("img", { src: photo.src, alt: photo.name, className: cx$4("photo-image") }) }),
901
+ /* @__PURE__ */ jsx("button", { className: cx$4("remove-button"), onClick: () => handleRemovePhoto(photo.id), "aria-label": "\uC0AC\uC9C4 \uC0AD\uC81C", children: "\xD7" })
314
902
  ] }, photo.id));
315
903
  };
316
904
  const renderPhotoGrid = () => {
@@ -318,12 +906,12 @@ function Attachment({
318
906
  const gridItems = [];
319
907
  if (photos.length < maxPhotos) {
320
908
  gridItems.push(
321
- /* @__PURE__ */ jsx("div", { className: cx("photo-item", "add-photo-item"), children: /* @__PURE__ */ jsxs("button", { className: cx("add-photo-button"), onClick: handleAddPhoto, children: [
909
+ /* @__PURE__ */ jsx("div", { className: cx$4("photo-item", "add-photo-item"), children: /* @__PURE__ */ jsxs("button", { className: cx$4("add-photo-button"), onClick: handleAddPhoto, children: [
322
910
  /* @__PURE__ */ jsx(Icon, { name: "illust/camera" }),
323
911
  /* @__PURE__ */ jsx("span", { children: buttonText || "\uCCA8\uBD80\uD558\uAE30" }),
324
- /* @__PURE__ */ jsxs("span", { className: cx("photo-count"), children: [
912
+ /* @__PURE__ */ jsxs("span", { className: cx$4("photo-count"), children: [
325
913
  "(",
326
- /* @__PURE__ */ jsx("span", { className: cx("photo-count-number"), children: photos.length }),
914
+ /* @__PURE__ */ jsx("span", { className: cx$4("photo-count-number"), children: photos.length }),
327
915
  "/",
328
916
  maxPhotos,
329
917
  ")"
@@ -333,9 +921,9 @@ function Attachment({
333
921
  }
334
922
  photos.forEach((photo) => {
335
923
  gridItems.push(
336
- /* @__PURE__ */ jsxs("div", { className: cx("photo-item"), children: [
337
- /* @__PURE__ */ jsx("div", { className: cx("photo-placeholder"), children: /* @__PURE__ */ jsx("img", { src: photo.src, alt: photo.name, className: cx("photo-image") }) }),
338
- /* @__PURE__ */ jsx("button", { className: cx("remove-button"), onClick: () => handleRemovePhoto(photo.id), "aria-label": "\uC0AC\uC9C4 \uC0AD\uC81C", children: "\xD7" })
924
+ /* @__PURE__ */ jsxs("div", { className: cx$4("photo-item"), children: [
925
+ /* @__PURE__ */ jsx("div", { className: cx$4("photo-placeholder"), children: /* @__PURE__ */ jsx("img", { src: photo.src, alt: photo.name, className: cx$4("photo-image") }) }),
926
+ /* @__PURE__ */ jsx("button", { className: cx$4("remove-button"), onClick: () => handleRemovePhoto(photo.id), "aria-label": "\uC0AC\uC9C4 \uC0AD\uC81C", children: "\xD7" })
339
927
  ] }, photo.id)
340
928
  );
341
929
  });
@@ -346,9 +934,9 @@ function Attachment({
346
934
  return null;
347
935
  }
348
936
  if (type === "single") {
349
- return /* @__PURE__ */ jsx("div", { className: cx("photo-single"), children: renderPhotoSingle() });
937
+ return /* @__PURE__ */ jsx("div", { className: cx$4("photo-single"), children: renderPhotoSingle() });
350
938
  }
351
- return /* @__PURE__ */ jsx("div", { className: cx("photo-grid", { linear: type === "linear" }), children: renderPhotoGrid() });
939
+ return /* @__PURE__ */ jsx("div", { className: cx$4("photo-grid", { linear: type === "linear" }), children: renderPhotoGrid() });
352
940
  }
353
941
 
354
942
  const maxImageSize = 3 * 1024 * 1024;
@@ -842,7 +1430,7 @@ const FloatingButton = ({ onClick }) => {
842
1430
  variant: "secondary",
843
1431
  appearance: "filled",
844
1432
  size: "xsmall",
845
- className: styles$2["debug-floating-button"],
1433
+ className: styles$3["debug-floating-button"],
846
1434
  style: {
847
1435
  transform: `translate(${position.x}px, ${position.y}px)`,
848
1436
  cursor: isDragging ? "grabbing" : "grab"
@@ -935,7 +1523,7 @@ const LogMessage = ({ entry }) => {
935
1523
  }
936
1524
  return String(part);
937
1525
  });
938
- return /* @__PURE__ */ jsx("pre", { className: `${styles$2["log-message"]} ${styles$2[`log-${entry.type}`]}`, children: messageParts.join(" ") });
1526
+ return /* @__PURE__ */ jsx("pre", { className: `${styles$3["log-message"]} ${styles$3[`log-${entry.type}`]}`, children: messageParts.join(" ") });
939
1527
  };
940
1528
  const ConsoleLogPanel = ({ onClose }) => {
941
1529
  const { logs, clearLogs } = useConsoleLog();
@@ -955,7 +1543,7 @@ const ConsoleLogPanel = ({ onClose }) => {
955
1543
  return /* @__PURE__ */ jsx(Modal.Root, { isOpen: true, onClose, modalSize: "full-screen", children: /* @__PURE__ */ jsxs(Modal.Content, { children: [
956
1544
  /* @__PURE__ */ jsx(Modal.Header, { headerTitle: "Console Logs", showCloseButton: true }),
957
1545
  /* @__PURE__ */ jsxs(Modal.Body, { children: [
958
- /* @__PURE__ */ jsxs("div", { className: styles$2["panel-toolbar"], children: [
1546
+ /* @__PURE__ */ jsxs("div", { className: styles$3["panel-toolbar"], children: [
959
1547
  /* @__PURE__ */ jsxs(
960
1548
  Segment.Root,
961
1549
  {
@@ -984,8 +1572,8 @@ const ConsoleLogPanel = ({ onClose }) => {
984
1572
  }
985
1573
  )
986
1574
  ] }),
987
- /* @__PURE__ */ jsx("div", { className: styles$2["log-list-container"], ref: logContainerRef, children: filteredLogs.map((log) => /* @__PURE__ */ jsxs("div", { className: styles$2["log-item"], children: [
988
- /* @__PURE__ */ jsx("span", { className: styles$2["log-timestamp"], children: log.timestamp }),
1575
+ /* @__PURE__ */ jsx("div", { className: styles$3["log-list-container"], ref: logContainerRef, children: filteredLogs.map((log) => /* @__PURE__ */ jsxs("div", { className: styles$3["log-item"], children: [
1576
+ /* @__PURE__ */ jsx("span", { className: styles$3["log-timestamp"], children: log.timestamp }),
989
1577
  /* @__PURE__ */ jsx(LogMessage, { entry: log })
990
1578
  ] }, log.id)) })
991
1579
  ] })
@@ -1012,7 +1600,7 @@ const LoginPanel = ({ onClose, onLogin }) => {
1012
1600
  }, [selectedType]);
1013
1601
  return /* @__PURE__ */ jsx(Modal.Root, { isOpen: true, onClose, modalSize: "full-screen", children: /* @__PURE__ */ jsxs(Modal.Content, { children: [
1014
1602
  /* @__PURE__ */ jsx(Modal.Header, { headerTitle: "\uAC04\uD3B8 \uB85C\uADF8\uC778", showCloseButton: true }),
1015
- /* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsxs("form", { className: styles$2["login-form-container"], onSubmit: handleSubmit, children: [
1603
+ /* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsxs("form", { className: styles$3["login-form-container"], onSubmit: handleSubmit, children: [
1016
1604
  /* @__PURE__ */ jsxs(FormField.FieldControl, { children: [
1017
1605
  /* @__PURE__ */ jsx(FormField.Label, { htmlFor: "login-type-select", children: "\uB85C\uADF8\uC778 \uC720\uD615" }),
1018
1606
  /* @__PURE__ */ jsx(
@@ -1042,7 +1630,7 @@ const LoginPanel = ({ onClose, onLogin }) => {
1042
1630
  }
1043
1631
  )
1044
1632
  ] }, field.name)),
1045
- /* @__PURE__ */ jsx("div", { className: styles$2["form-actions"], children: /* @__PURE__ */ jsx(Button, { type: "submit", variant: "primary", appearance: "filled", size: "xsmall", children: "\uB85C\uADF8\uC778" }) })
1633
+ /* @__PURE__ */ jsx("div", { className: styles$3["form-actions"], children: /* @__PURE__ */ jsx(Button, { type: "submit", variant: "primary", appearance: "filled", size: "xsmall", children: "\uB85C\uADF8\uC778" }) })
1046
1634
  ] }) })
1047
1635
  ] }) });
1048
1636
  };
@@ -1152,7 +1740,7 @@ const NetworkLog = ({ onClose }) => {
1152
1740
  /* @__PURE__ */ jsxs(Modal.Content, { children: [
1153
1741
  /* @__PURE__ */ jsx(Modal.Header, { headerTitle: "\uB124\uD2B8\uC6CC\uD06C \uB85C\uADF8", showCloseButton: true }),
1154
1742
  /* @__PURE__ */ jsxs(Modal.Body, { children: [
1155
- /* @__PURE__ */ jsxs("div", { className: styles$3["search-container"], children: [
1743
+ /* @__PURE__ */ jsxs("div", { className: styles$4["search-container"], children: [
1156
1744
  /* @__PURE__ */ jsx(Select, { value: searchSection, onChange: (value) => setSearchSection(value), size: "xsmall", children: SEARCH_SECTIONS.map((option) => /* @__PURE__ */ jsx(Select.Option, { value: option.value, children: option.label }, option.value)) }),
1157
1745
  /* @__PURE__ */ jsx(
1158
1746
  FormField.TextField,
@@ -1170,9 +1758,9 @@ const NetworkLog = ({ onClose }) => {
1170
1758
  /* @__PURE__ */ jsx(Button, { size: "xsmall", onClick: () => playAllRequests(), variant: "primary", appearance: "outline", children: "REQ Resolve" }),
1171
1759
  /* @__PURE__ */ jsx(Button, { size: "xsmall", onClick: () => playAllResponses(), variant: "primary", appearance: "outline", children: "RES Resolve" })
1172
1760
  ] }),
1173
- /* @__PURE__ */ jsx("div", { className: styles$3["log-list"], children: filteredLogs.length === 0 ? /* @__PURE__ */ jsx("p", { children: "\uD45C\uC2DC\uD560 \uB85C\uADF8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4." }) : /* @__PURE__ */ jsx(Accordion.Root, { children: filteredLogs.map((log, index) => /* @__PURE__ */ jsxs(Accordion.Item, { children: [
1174
- /* @__PURE__ */ jsx(Accordion.HeaderButton, { children: /* @__PURE__ */ jsx("p", { className: styles$3["log-summary"], children: renderLogSummary(log) }) }),
1175
- /* @__PURE__ */ jsx(Accordion.Content, { variant: "text", children: /* @__PURE__ */ jsx("div", { className: styles$3["log-content"], children: renderLogContent(log) }) })
1761
+ /* @__PURE__ */ jsx("div", { className: styles$4["log-list"], children: filteredLogs.length === 0 ? /* @__PURE__ */ jsx("p", { children: "\uD45C\uC2DC\uD560 \uB85C\uADF8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4." }) : /* @__PURE__ */ jsx(Accordion.Root, { children: filteredLogs.map((log, index) => /* @__PURE__ */ jsxs(Accordion.Item, { children: [
1762
+ /* @__PURE__ */ jsx(Accordion.HeaderButton, { children: /* @__PURE__ */ jsx("p", { className: styles$4["log-summary"], children: renderLogSummary(log) }) }),
1763
+ /* @__PURE__ */ jsx(Accordion.Content, { variant: "text", children: /* @__PURE__ */ jsx("div", { className: styles$4["log-content"], children: renderLogContent(log) }) })
1176
1764
  ] }, index)) }) })
1177
1765
  ] })
1178
1766
  ] })
@@ -1188,7 +1776,7 @@ const PageNavigationPanel = ({ onClose }) => {
1188
1776
  };
1189
1777
  return /* @__PURE__ */ jsx(Modal.Root, { isOpen: true, onClose, modalSize: "full-screen", children: /* @__PURE__ */ jsxs(Modal.Content, { children: [
1190
1778
  /* @__PURE__ */ jsx(Modal.Header, { headerTitle: "\uD398\uC774\uC9C0 \uC774\uB3D9", showCloseButton: true }),
1191
- /* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsxs("div", { className: styles$2["page-navigation-content"], children: [
1779
+ /* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsxs("div", { className: styles$3["page-navigation-content"], children: [
1192
1780
  /* @__PURE__ */ jsx(
1193
1781
  FormField.TextField,
1194
1782
  {
@@ -1221,7 +1809,7 @@ const ResultMessage = ({ log }) => {
1221
1809
  return String(part);
1222
1810
  });
1223
1811
  const prefix = log.type === "return" ? "\u21A9 " : "";
1224
- return /* @__PURE__ */ jsxs("pre", { className: `${styles$2["log-message"]} ${styles$2[`log-${log.type}`]}`, children: [
1812
+ return /* @__PURE__ */ jsxs("pre", { className: `${styles$3["log-message"]} ${styles$3[`log-${log.type}`]}`, children: [
1225
1813
  prefix,
1226
1814
  messageParts.join(" ")
1227
1815
  ] });
@@ -1273,26 +1861,26 @@ const ScriptExecutorPanel = ({ onClose }) => {
1273
1861
  };
1274
1862
  return /* @__PURE__ */ jsx(Modal.Root, { isOpen: true, onClose, modalSize: "full-screen", children: /* @__PURE__ */ jsxs(Modal.Content, { children: [
1275
1863
  /* @__PURE__ */ jsx(Modal.Header, { headerTitle: "\uC2A4\uD06C\uB9BD\uD2B8 \uC2E4\uD589", showCloseButton: true }),
1276
- /* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsx("div", { className: `${styles$2["debug-feature-panel"]} ${styles$2["script-executor-panel"]}`, children: /* @__PURE__ */ jsxs("div", { className: styles$2["script-executor-content"], children: [
1277
- /* @__PURE__ */ jsxs("div", { className: styles$2["script-input-section"], children: [
1864
+ /* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsx("div", { className: `${styles$3["debug-feature-panel"]} ${styles$3["script-executor-panel"]}`, children: /* @__PURE__ */ jsxs("div", { className: styles$3["script-executor-content"], children: [
1865
+ /* @__PURE__ */ jsxs("div", { className: styles$3["script-input-section"], children: [
1278
1866
  /* @__PURE__ */ jsx(
1279
1867
  "textarea",
1280
1868
  {
1281
- className: styles$2["script-textarea"],
1869
+ className: styles$3["script-textarea"],
1282
1870
  value: code,
1283
1871
  onChange: (e) => setCode(e.target.value),
1284
1872
  spellCheck: "false"
1285
1873
  }
1286
1874
  ),
1287
- /* @__PURE__ */ jsxs("div", { className: styles$2["script-actions"], children: [
1875
+ /* @__PURE__ */ jsxs("div", { className: styles$3["script-actions"], children: [
1288
1876
  /* @__PURE__ */ jsx(Button, { variant: "neutral", appearance: "outline", size: "xsmall", onClick: handleExecute, children: "\uC2E4\uD589 (\u25B6)" }),
1289
1877
  /* @__PURE__ */ jsx(Button, { variant: "neutral", appearance: "outline", size: "xsmall", onClick: handleClear, children: "\uACB0\uACFC \uC9C0\uC6B0\uAE30" })
1290
1878
  ] })
1291
1879
  ] }),
1292
- /* @__PURE__ */ jsxs("div", { className: styles$2["script-output-section"], children: [
1293
- /* @__PURE__ */ jsx("div", { className: styles$2["panel-header"], children: /* @__PURE__ */ jsx("h3", { children: "\uACB0\uACFC" }) }),
1294
- /* @__PURE__ */ jsx("div", { className: styles$2["log-list-container"], children: results.map((log) => /* @__PURE__ */ jsxs("div", { className: styles$2["log-item"], children: [
1295
- /* @__PURE__ */ jsx("span", { className: styles$2["log-timestamp"], children: log.timestamp }),
1880
+ /* @__PURE__ */ jsxs("div", { className: styles$3["script-output-section"], children: [
1881
+ /* @__PURE__ */ jsx("div", { className: styles$3["panel-header"], children: /* @__PURE__ */ jsx("h3", { children: "\uACB0\uACFC" }) }),
1882
+ /* @__PURE__ */ jsx("div", { className: styles$3["log-list-container"], children: results.map((log) => /* @__PURE__ */ jsxs("div", { className: styles$3["log-item"], children: [
1883
+ /* @__PURE__ */ jsx("span", { className: styles$3["log-timestamp"], children: log.timestamp }),
1296
1884
  /* @__PURE__ */ jsx(ResultMessage, { log })
1297
1885
  ] }, log.id)) })
1298
1886
  ] })
@@ -1361,11 +1949,11 @@ const ValueDisplay = ({ value }) => {
1361
1949
  try {
1362
1950
  const parsed = JSON.parse(value);
1363
1951
  if (typeof parsed === "object" && parsed !== null) {
1364
- return /* @__PURE__ */ jsx("pre", { className: styles$2["log-content"], children: JSON.stringify(parsed, null, 2) });
1952
+ return /* @__PURE__ */ jsx("pre", { className: styles$3["log-content"], children: JSON.stringify(parsed, null, 2) });
1365
1953
  }
1366
1954
  } catch (e) {
1367
1955
  }
1368
- return /* @__PURE__ */ jsx("div", { className: styles$2["log-content"], children: value });
1956
+ return /* @__PURE__ */ jsx("div", { className: styles$3["log-content"], children: value });
1369
1957
  };
1370
1958
  const EditableRow = ({ item, onSave, onRemove }) => {
1371
1959
  const [isEditing, setIsEditing] = useState(false);
@@ -1404,7 +1992,7 @@ const StoragePanel = ({ onClose, storageType }) => {
1404
1992
  return /* @__PURE__ */ jsx(Modal.Root, { isOpen: true, onClose, modalSize: "full-screen", children: /* @__PURE__ */ jsxs(Modal.Content, { children: [
1405
1993
  /* @__PURE__ */ jsx(Modal.Header, { headerTitle: storageType === "localStorage" ? "Local Storage" : "Cookies", showCloseButton: true }),
1406
1994
  /* @__PURE__ */ jsxs(Modal.Body, { children: [
1407
- /* @__PURE__ */ jsx("div", { className: styles$2["panel-toolbar"], children: /* @__PURE__ */ jsx(
1995
+ /* @__PURE__ */ jsx("div", { className: styles$3["panel-toolbar"], children: /* @__PURE__ */ jsx(
1408
1996
  FormField.TextField,
1409
1997
  {
1410
1998
  placeholder: "Search key or value...",
@@ -1546,5 +2134,487 @@ const DebugTool = ({ onLogin, envOverride, menuItemsOverride }) => {
1546
2134
  ] });
1547
2135
  };
1548
2136
 
1549
- export { Attachment, DebugTool, FormCheckbox, FormCheckboxButton, FormDatePicker, FormDateRangePicker, FormSegmentGroup, FormTextField, StepIndicator, resize, testSignatureBase64Data, useCamera, useCanvasPaint };
2137
+ const cx$3 = classNames.bind(styles$5);
2138
+ const { InputBox, Input } = FormCore;
2139
+ const AddressSearchInitialText = () => {
2140
+ return /* @__PURE__ */ jsxs("div", { children: [
2141
+ /* @__PURE__ */ jsx("p", { className: cx$3("guide-title"), children: "\uC774\uB807\uAC8C \uAC80\uC0C9\uD574 \uBCF4\uC138\uC694." }),
2142
+ /* @__PURE__ */ jsxs("ul", { className: cx$3("guide"), children: [
2143
+ /* @__PURE__ */ jsx("li", { children: "\uB3C4\uB85C\uBA85/\uC9C0\uBA85\uACFC \uAC74\uBB3C\uBC88\uD638\uB97C \uD568\uAED8 \uC785\uB825\uD574\uC8FC\uC138\uC694" }),
2144
+ /* @__PURE__ */ jsx("li", { children: "\uC608) 63\uB85C 50, \uC5EC\uC758\uB3C4\uB3D9 60" }),
2145
+ /* @__PURE__ */ jsx("li", { children: "\uC9C0\uBA85\uC740 \uB3D9/\uC74D/\uBA74/\uB9AC\uB85C \uC785\uB825\uD574\uC8FC\uC138\uC694" }),
2146
+ /* @__PURE__ */ jsx("li", { children: "\uC608) \uC5EC\uC758\uB3C4\uB3D9, \uC5ED\uC0BC\uB3D9" }),
2147
+ /* @__PURE__ */ jsx("li", { children: "\uC6B0\uD3B8\uBC88\uD638 \uB2E4\uC12F\uC790\uB9AC\uB97C \uBAA8\uB450 \uC785\uB825\uD574\uC8FC\uC138\uC694" }),
2148
+ /* @__PURE__ */ jsx("li", { children: "\uC608) 07345, 06232" })
2149
+ ] })
2150
+ ] });
2151
+ };
2152
+ const AddressSearchResult = ({
2153
+ addressSearchList,
2154
+ onChange,
2155
+ searchKeyword,
2156
+ selectedAddress
2157
+ }) => {
2158
+ const [filterList, setFilterList] = useState([]);
2159
+ useEffect(() => {
2160
+ const filterList2 = addressSearchList.filter(
2161
+ (item) => item.address.includes(searchKeyword) || item.oldAddress.includes(searchKeyword)
2162
+ ) || [];
2163
+ setFilterList(filterList2);
2164
+ }, [addressSearchList, searchKeyword]);
2165
+ return /* @__PURE__ */ jsxs("div", { children: [
2166
+ /* @__PURE__ */ jsxs("p", { className: cx$3("guide-title"), children: [
2167
+ "\uCD1D ",
2168
+ /* @__PURE__ */ jsx("span", { className: "text-primary", children: filterList.length }),
2169
+ "\uAC74\uC758 \uAC80\uC0C9\uACB0\uACFC"
2170
+ ] }),
2171
+ filterList.length > 0 && /* @__PURE__ */ jsx(
2172
+ RadioGroup,
2173
+ {
2174
+ items: filterList.map((item) => ({
2175
+ value: item.address,
2176
+ select: item.address === selectedAddress?.address && item.zipCode === selectedAddress?.zipCode,
2177
+ label: /* @__PURE__ */ jsxs("div", { className: cx$3("search-result"), children: [
2178
+ /* @__PURE__ */ jsxs("div", { className: cx$3("zipcode"), children: [
2179
+ " ",
2180
+ highlightOnSearchKeyword(item.zipCode, searchKeyword)
2181
+ ] }),
2182
+ /* @__PURE__ */ jsx("div", { className: cx$3("divider") }),
2183
+ /* @__PURE__ */ jsxs("div", { className: cx$3("address-info"), children: [
2184
+ /* @__PURE__ */ jsx("span", { className: cx$3("address"), children: highlightOnSearchKeyword(item.address, searchKeyword) }),
2185
+ /* @__PURE__ */ jsx("span", { className: cx$3("old-address"), children: highlightOnSearchKeyword(item.oldAddress, searchKeyword) })
2186
+ ] })
2187
+ ] }),
2188
+ id: item.address
2189
+ })),
2190
+ className: cx$3("radio-group"),
2191
+ name: "address-search",
2192
+ size: "medium",
2193
+ defaultValue: "",
2194
+ onChange
2195
+ }
2196
+ ),
2197
+ filterList.length === 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
2198
+ "`",
2199
+ /* @__PURE__ */ jsx("span", { className: "text-primary", children: searchKeyword }),
2200
+ "`\uC5D0 \uB300\uD55C \uAC80\uC0C9\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."
2201
+ ] })
2202
+ ] });
2203
+ };
2204
+ const AddressSearchDetailInput = ({
2205
+ selectedAddress,
2206
+ onDetailChange,
2207
+ step,
2208
+ detailAddressInput
2209
+ }) => {
2210
+ return /* @__PURE__ */ jsxs("div", { children: [
2211
+ /* @__PURE__ */ jsxs("div", { children: [
2212
+ /* @__PURE__ */ jsxs("div", { children: [
2213
+ " ",
2214
+ selectedAddress.zipCode
2215
+ ] }),
2216
+ /* @__PURE__ */ jsxs("div", { children: [
2217
+ "|",
2218
+ /* @__PURE__ */ jsx("span", { children: `${selectedAddress.address}` })
2219
+ ] })
2220
+ ] }),
2221
+ /* @__PURE__ */ jsxs("div", { children: [
2222
+ /* @__PURE__ */ jsx(FormField.Label, { id: "detail", style: { width: "90px" }, children: "\uC0C1\uC138\uC8FC\uC18C" }),
2223
+ /* @__PURE__ */ jsx(
2224
+ Input,
2225
+ {
2226
+ placeholder: "\uC0C1\uC138\uC8FC\uC18C \uC785\uB825",
2227
+ onChange: onDetailChange,
2228
+ size: "large",
2229
+ value: detailAddressInput,
2230
+ ...step === "detail-input" && { autoFocus: true }
2231
+ }
2232
+ )
2233
+ ] })
2234
+ ] });
2235
+ };
2236
+ function AddressComponent({ isOpen, onClose, setValue }) {
2237
+ const {
2238
+ onAddressSearchClear,
2239
+ addressSearchKeyword,
2240
+ addressSearchStep,
2241
+ onAddressSearchNext,
2242
+ nextButtonDisabled,
2243
+ detailAddressInput,
2244
+ addressSearchList,
2245
+ onSearch,
2246
+ onKeyUp,
2247
+ onSelectChange,
2248
+ setDetail,
2249
+ search,
2250
+ searchInput,
2251
+ selectedAddress
2252
+ } = useSearchAddress({
2253
+ setValue,
2254
+ onClose,
2255
+ isOpen
2256
+ });
2257
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Modal.Root, { isOpen, onClose, modalSize: "full-screen", children: [
2258
+ /* @__PURE__ */ jsx(Modal.Overlay, {}),
2259
+ /* @__PURE__ */ jsxs(Modal.Content, { children: [
2260
+ /* @__PURE__ */ jsx(Modal.Header, { headerTitle: "\uC8FC\uC18C \uAC80\uC0C9", showCloseButton: true }),
2261
+ /* @__PURE__ */ jsxs(Modal.Body, { children: [
2262
+ /* @__PURE__ */ jsx(
2263
+ InputBox,
2264
+ {
2265
+ clearable: true,
2266
+ endElement: /* @__PURE__ */ jsx(Icon, { name: "sub-ui/search", onClick: search }),
2267
+ onClear: onAddressSearchClear,
2268
+ children: /* @__PURE__ */ jsx(
2269
+ Input,
2270
+ {
2271
+ ...addressSearchStep !== "detail-input" && { autoFocus: true },
2272
+ onChange: onSearch,
2273
+ onKeyUp,
2274
+ value: searchInput,
2275
+ placeholder: "\uC9C0\uBC88, \uB3C4\uB85C\uBA85, \uAC74\uBB3C\uBA85, \uC6B0\uD3B8\uBC88\uD638 \uC785\uB825",
2276
+ size: "large"
2277
+ }
2278
+ )
2279
+ }
2280
+ ),
2281
+ addressSearchStep === "initial" && /* @__PURE__ */ jsx(AddressSearchInitialText, {}),
2282
+ addressSearchStep === "search-result" && /* @__PURE__ */ jsx(
2283
+ AddressSearchResult,
2284
+ {
2285
+ onChange: onSelectChange,
2286
+ addressSearchList: addressSearchList || [],
2287
+ searchKeyword: addressSearchKeyword,
2288
+ selectedAddress
2289
+ }
2290
+ ),
2291
+ addressSearchStep === "detail-input" && selectedAddress && /* @__PURE__ */ jsx(
2292
+ AddressSearchDetailInput,
2293
+ {
2294
+ selectedAddress,
2295
+ onDetailChange: setDetail,
2296
+ step: addressSearchStep,
2297
+ detailAddressInput
2298
+ }
2299
+ )
2300
+ ] }),
2301
+ /* @__PURE__ */ jsx(Modal.Footer, { children: addressSearchStep !== "initial" && /* @__PURE__ */ jsxs(
2302
+ Button,
2303
+ {
2304
+ onClick: onAddressSearchNext,
2305
+ variant: "primary",
2306
+ size: "medium",
2307
+ appearance: "filled",
2308
+ width: "full",
2309
+ disabled: nextButtonDisabled,
2310
+ children: [
2311
+ addressSearchStep === "search-result" && "\uB2E4\uC74C(1/2)",
2312
+ addressSearchStep === "detail-input" && "\uD655\uC778(2/2)"
2313
+ ]
2314
+ }
2315
+ ) })
2316
+ ] })
2317
+ ] }) });
2318
+ }
2319
+
2320
+ function useSearchAddress({ setValue, onClose, isOpen }) {
2321
+ const [searchKeyword, setSearchKeyword] = useState("");
2322
+ const [step, setStep] = useState("initial");
2323
+ const [selectedAddress, setSelectedAddress] = useState(null);
2324
+ const [searchInput, setSearchInput] = useState("");
2325
+ const [detailAddressInput, setDetailAddressInput] = useState("");
2326
+ const { data: addressList } = useSearchModalAddressQuery({ searchKeyword });
2327
+ const [nextButtonDisabled, setNextButtonDisabled] = useState(false);
2328
+ const onNext = () => {
2329
+ if (step === "search-result") {
2330
+ setStep("detail-input");
2331
+ setNextButtonDisabled(true);
2332
+ } else {
2333
+ setValue({
2334
+ address: selectedAddress?.address || "",
2335
+ oldAddress: selectedAddress?.oldAddress || "",
2336
+ zipCode: selectedAddress?.zipCode || "",
2337
+ detail: detailAddressInput || ""
2338
+ });
2339
+ onClose();
2340
+ }
2341
+ };
2342
+ const onSearch = (e) => {
2343
+ const typeStr = e.target.value;
2344
+ setSearchInput(typeStr);
2345
+ };
2346
+ const search = () => {
2347
+ if (searchInput === "") {
2348
+ onClear();
2349
+ return;
2350
+ }
2351
+ if (searchInput && searchInput.length > 1) {
2352
+ setSearchKeyword(searchInput);
2353
+ setStep("search-result");
2354
+ setSelectedAddress(null);
2355
+ setDetailAddressInput("");
2356
+ setNextButtonDisabled(true);
2357
+ }
2358
+ };
2359
+ const onKeyUp = (e) => {
2360
+ if (e.key === "Enter") {
2361
+ search();
2362
+ }
2363
+ };
2364
+ const onSelectChange = (e) => {
2365
+ const selectedAddress2 = e.target.value;
2366
+ if (selectedAddress2) {
2367
+ const adr = addressList?.find((addr) => {
2368
+ return addr.address === selectedAddress2;
2369
+ });
2370
+ setSelectedAddress(adr || null);
2371
+ setNextButtonDisabled(false);
2372
+ }
2373
+ };
2374
+ const onClear = useCallback(() => {
2375
+ setSearchKeyword("");
2376
+ setSearchInput("");
2377
+ setSelectedAddress(null);
2378
+ setDetailAddressInput("");
2379
+ setStep("initial");
2380
+ }, []);
2381
+ const setDetail = (e) => {
2382
+ const detail = e.target.value;
2383
+ setDetailAddressInput(detail);
2384
+ if (detail) {
2385
+ setNextButtonDisabled(false);
2386
+ } else {
2387
+ setNextButtonDisabled(true);
2388
+ }
2389
+ };
2390
+ useEffect(() => {
2391
+ if (isOpen) {
2392
+ setSelectedAddress(null);
2393
+ setDetailAddressInput("");
2394
+ setStep("initial");
2395
+ setSearchKeyword("");
2396
+ }
2397
+ }, [isOpen]);
2398
+ return {
2399
+ onAddressSearchClear: onClear,
2400
+ onAddressSearchNext: onNext,
2401
+ addressSearchKeyword: searchKeyword,
2402
+ addressSearchList: addressList,
2403
+ addressSearchStep: step,
2404
+ selectedAddress,
2405
+ addressSearchOnValueChange: onSelectChange,
2406
+ nextButtonDisabled,
2407
+ detailAddressInput,
2408
+ onSearch,
2409
+ onKeyUp,
2410
+ onSelectChange,
2411
+ setDetail,
2412
+ search,
2413
+ searchInput
2414
+ };
2415
+ }
2416
+ const useAddressComponent = () => {
2417
+ const [fullAddress, setFullAddress] = useState(null);
2418
+ const { isOpen, closeModal, openModal } = useModalState();
2419
+ const AddressSearchComponent = () => /* @__PURE__ */ jsx(AddressComponent, { isOpen, onClose: closeModal, setValue: setFullAddress });
2420
+ return {
2421
+ fullAddress,
2422
+ openModal,
2423
+ AddressSearchComponent
2424
+ };
2425
+ };
2426
+
2427
+ const cx$2 = classNames.bind(styles$6);
2428
+ const JobVehicleSearchGrade = ({ riskGrade, hospitalizationGrade }) => {
2429
+ return /* @__PURE__ */ jsxs("div", { className: cx$2("grade-section"), children: [
2430
+ /* @__PURE__ */ jsxs("div", { className: cx$2("icon-title"), children: [
2431
+ /* @__PURE__ */ jsx(Icon, { name: "illust/grade" }),
2432
+ /* @__PURE__ */ jsx("span", { className: "typo-title5 text-body", children: "\uB4F1\uAE09" })
2433
+ ] }),
2434
+ /* @__PURE__ */ jsx("p", { className: "typo-body2 text-body_3", children: "\uC9C1\uC885, \uC6B4\uC804 \uC5EC\uBD80 \uC120\uD0DD\uC2DC \uC790\uB3D9\uC73C\uB85C \uC0B0\uC815\uB429\uB2C8\uB2E4." }),
2435
+ /* @__PURE__ */ jsxs("div", { className: cx$2("grade-list"), children: [
2436
+ /* @__PURE__ */ jsxs("div", { className: cx$2("grade"), children: [
2437
+ /* @__PURE__ */ jsx("span", { children: "\uC704\uD5D8\uB4F1\uAE09" }),
2438
+ /* @__PURE__ */ jsx("span", { className: "text-primary typo-subtitle3", children: riskGrade || "-" })
2439
+ ] }),
2440
+ /* @__PURE__ */ jsxs("div", { className: cx$2("grade"), children: [
2441
+ /* @__PURE__ */ jsx("span", { children: "\uC785\uC6D0\uB4F1\uAE09" }),
2442
+ /* @__PURE__ */ jsx("span", { className: "text-primary typo-subtitle3", children: hospitalizationGrade || "-" })
2443
+ ] })
2444
+ ] })
2445
+ ] });
2446
+ };
2447
+
2448
+ const cx$1 = classNames.bind(styles$7);
2449
+ function VehicleSearch({ vehicles, onVehicleSelect }) {
2450
+ return /* @__PURE__ */ jsxs("div", { className: cx$1("vehicle-search-section"), children: [
2451
+ /* @__PURE__ */ jsx("p", { children: "\uC6B4\uC804 \uCC28\uC885" }),
2452
+ /* @__PURE__ */ jsx(Radio.Root, { name: "vehicle-selection", size: "small", className: cx$1("vehicle-radio-root"), children: vehicles.map((vehicle, index) => /* @__PURE__ */ jsxs(
2453
+ Radio.Item,
2454
+ {
2455
+ id: `item-${vehicle.integrationCodeValue}`,
2456
+ size: "small",
2457
+ value: vehicle.integrationCodeValue || "",
2458
+ onChange: (e) => {
2459
+ const { value } = e.target;
2460
+ console.log(e.target.value);
2461
+ const selected = vehicles.find((v) => v.integrationCodeValue === value);
2462
+ if (selected) {
2463
+ onVehicleSelect(selected);
2464
+ }
2465
+ },
2466
+ className: cx$1("item"),
2467
+ children: [
2468
+ vehicle.integrationCodeValueName,
2469
+ "(",
2470
+ vehicle.integrationCodeValue,
2471
+ ")"
2472
+ ]
2473
+ },
2474
+ `item-${vehicle.integrationCodeValue}-${index}`
2475
+ )) })
2476
+ ] });
2477
+ }
2478
+
2479
+ const useVehicleSearch = () => {
2480
+ const [selectedVehicle, setSelectedVehicle] = useState();
2481
+ const { data } = useSearchVehicleQuery();
2482
+ return {
2483
+ VehicleSearchComponent: /* @__PURE__ */ jsx(VehicleSearch, { vehicles: data?.data?.vehicleTypeList || [], onVehicleSelect: setSelectedVehicle }),
2484
+ selectedVehicle,
2485
+ setSelectedVehicle,
2486
+ vehicleList: data
2487
+ };
2488
+ };
2489
+
2490
+ const useJobVehicleSearch = () => {
2491
+ const [rightPanelView, setRightPanelView] = useState("jobSearch");
2492
+ const [riskGrade, setRiskGrade] = useState("");
2493
+ const [hospitalizationGrade, setHospitalizationGrade] = useState("");
2494
+ const { selectedJob, JobSearchComponent } = useJobSearchModal();
2495
+ const { selectedVehicle, VehicleSearchComponent } = useVehicleSearch();
2496
+ useEffect(() => {
2497
+ if (selectedJob && selectedVehicle) {
2498
+ setRiskGrade("\uC77C\uBC18(\uBE44\uC704\uD5D8\uC9C1)(0)");
2499
+ setHospitalizationGrade("\uC77C\uBC18\uC785\uC6D0(\uBE44\uC704\uD5D8\uC9C1)(0)");
2500
+ }
2501
+ }, [selectedJob, selectedVehicle]);
2502
+ return {
2503
+ selectedVehicle,
2504
+ rightPanelView,
2505
+ setRightPanelView,
2506
+ selectedJob,
2507
+ JobSearch: JobSearchComponent,
2508
+ VehicleSearch: VehicleSearchComponent,
2509
+ riskGrade,
2510
+ hospitalizationGrade
2511
+ };
2512
+ };
2513
+
2514
+ const cx = classNames.bind(styles$6);
2515
+ function useJobVehicleSearchModal() {
2516
+ const {
2517
+ selectedVehicle,
2518
+ rightPanelView,
2519
+ setRightPanelView,
2520
+ selectedJob,
2521
+ JobSearch,
2522
+ VehicleSearch,
2523
+ riskGrade,
2524
+ hospitalizationGrade
2525
+ } = useJobVehicleSearch();
2526
+ const { isOpen, openModal, closeModal } = useModalState({ initialValue: true });
2527
+ const validate = () => {
2528
+ console.log({ selectedJob, selectedVehicle });
2529
+ if (!selectedJob && !selectedVehicle) {
2530
+ return ModalUtils.alert(
2531
+ "\uC9C1\uC885\uACFC \uC6B4\uC804 \uC5EC\uBD80\xB7\uCC28\uC885\uC744 \uBAA8\uB450 \uC120\uD0DD\uD574\uC57C \uB4F1\uAE09 \uC0B0\uC815\uC774 \uAC00\uB2A5\uD569\uB2C8\uB2E4.",
2532
+ "\uC9C1\uC885\uACFC \uC6B4\uC804 \uC5EC\uBD80\xB7\uCC28\uC885\uC744 \uC120\uD0DD\uD574\uC8FC\uC138\uC694",
2533
+ {
2534
+ modalSize: "small"
2535
+ }
2536
+ );
2537
+ }
2538
+ if (!selectedJob) {
2539
+ return ModalUtils.alert("\uC9C1\uC885\uC744 \uC120\uD0DD\uD574\uC57C \uB4F1\uAE09 \uC0B0\uC815\uC774 \uAC00\uB2A5\uD569\uB2C8\uB2E4.", "\uC9C1\uC885\uC744 \uC120\uD0DD\uD574\uC8FC\uC138\uC694", {
2540
+ modalSize: "small"
2541
+ });
2542
+ }
2543
+ if (!selectedVehicle) {
2544
+ return ModalUtils.alert("\uC6B4\uC804 \uC5EC\uBD80\xB7\uCC28\uC885\uC744 \uC120\uD0DD\uD574\uC57C \uB4F1\uAE09 \uC0B0\uC815\uC774 \uAC00\uB2A5\uD569\uB2C8\uB2E4.", "\uC6B4\uC804 \uC5EC\uBD80\xB7\uCC28\uC885\uC744 \uC120\uD0DD\uD574\uC8FC\uC138\uC694", {
2545
+ modalSize: "small"
2546
+ });
2547
+ }
2548
+ closeModal();
2549
+ };
2550
+ return {
2551
+ selectedJob,
2552
+ selectedVehicle,
2553
+ riskGrade,
2554
+ hospitalizationGrade,
2555
+ openJobVehicleModal: openModal,
2556
+ JobVehicleSearchModalComponent: /* @__PURE__ */ jsxs(Modal.Root, { isOpen, onClose: closeModal, modalSize: "xlarge", children: [
2557
+ /* @__PURE__ */ jsx(Modal.Overlay, {}),
2558
+ /* @__PURE__ */ jsxs(Modal.Content, { style: { height: "697px" }, children: [
2559
+ /* @__PURE__ */ jsx(Modal.Header, { headerTitle: "\uC9C1\uC885\xB7\uC6B4\uC804\uCC28\uC885 \uAC80\uC0C9", showCloseButton: true }),
2560
+ /* @__PURE__ */ jsx(Modal.Body, { className: cx("job-vehicle-search-modal"), raw: true, children: /* @__PURE__ */ jsxs(Fragment, { children: [
2561
+ /* @__PURE__ */ jsxs("div", { className: cx("left-panel"), children: [
2562
+ /* @__PURE__ */ jsxs("div", { className: cx("card-section"), children: [
2563
+ /* @__PURE__ */ jsxs(
2564
+ "div",
2565
+ {
2566
+ className: cx("card-menu", { "card-selected": rightPanelView === "jobSearch" }),
2567
+ onClick: () => setRightPanelView("jobSearch"),
2568
+ children: [
2569
+ /* @__PURE__ */ jsxs("div", { className: cx("card-title"), children: [
2570
+ /* @__PURE__ */ jsx(Icon, { name: "illust/job", className: cx("card-icon") }),
2571
+ /* @__PURE__ */ jsx("span", { className: cx("card-text", "typo-title5", "text-body"), children: "\uC9C1\uC885" }),
2572
+ /* @__PURE__ */ jsx(Icon, { name: "sub-ui/arrow/right" })
2573
+ ] }),
2574
+ /* @__PURE__ */ jsx("div", { className: "typo-body2 text-body_2", children: selectedJob ? selectedJob.occupationIndustryName : "\uBBF8\uC120\uD0DD" })
2575
+ ]
2576
+ }
2577
+ ),
2578
+ /* @__PURE__ */ jsxs(
2579
+ "div",
2580
+ {
2581
+ className: cx("card-menu", { "card-selected": rightPanelView === "vehicleSelection" }),
2582
+ onClick: () => setRightPanelView("vehicleSelection"),
2583
+ children: [
2584
+ /* @__PURE__ */ jsxs("div", { className: cx("card-title"), children: [
2585
+ /* @__PURE__ */ jsx(Icon, { name: "illust/vehicle", className: cx("card-icon") }),
2586
+ /* @__PURE__ */ jsx("span", { className: cx("card-text", "typo-title5", "text-body"), children: "\uC6B4\uC804 \uC5EC\uBD80\xB7\uCC28\uC885" }),
2587
+ /* @__PURE__ */ jsx(Icon, { name: "sub-ui/arrow/right" })
2588
+ ] }),
2589
+ /* @__PURE__ */ jsxs("div", { className: "typo-body2 text-body_2", children: [
2590
+ selectedVehicle?.integrationCodeValueName,
2591
+ selectedVehicle?.integrationCodeValue || "\uBBF8\uC120\uD0DD"
2592
+ ] })
2593
+ ]
2594
+ }
2595
+ )
2596
+ ] }),
2597
+ /* @__PURE__ */ jsx(JobVehicleSearchGrade, { riskGrade, hospitalizationGrade })
2598
+ ] }),
2599
+ /* @__PURE__ */ jsx("div", { className: cx("right-panel"), children: rightPanelView === "jobSearch" ? JobSearch : VehicleSearch })
2600
+ ] }) }),
2601
+ /* @__PURE__ */ jsx(Modal.Footer, { style: { marginTop: 0 }, children: /* @__PURE__ */ jsx(Button, { variant: "primary", size: "medium", appearance: "filled", width: "full", onClick: validate, children: "\uD655\uC778" }) })
2602
+ ] })
2603
+ ] })
2604
+ };
2605
+ }
2606
+
2607
+ const JobSearchModal = ({ onClose }) => {
2608
+ const { JobSearchComponent } = useJobSearchModal();
2609
+ return /* @__PURE__ */ jsxs(Modal.Root, { isOpen: true, onClose, modalSize: "xlarge", children: [
2610
+ /* @__PURE__ */ jsx(Modal.Overlay, {}),
2611
+ /* @__PURE__ */ jsxs(Modal.Content, { style: { height: "697px" }, children: [
2612
+ /* @__PURE__ */ jsx(Modal.Header, { headerTitle: "\uC9C1\uC885 \uAC80\uC0C9", showCloseButton: true }),
2613
+ /* @__PURE__ */ jsx(Modal.Body, { raw: true, children: JobSearchComponent }),
2614
+ /* @__PURE__ */ jsx(Modal.Footer, { children: /* @__PURE__ */ jsx(Button, { variant: "primary", size: "medium", appearance: "filled", width: "full", onClick: onClose, children: "\uD655\uC778" }) })
2615
+ ] })
2616
+ ] });
2617
+ };
2618
+
2619
+ export { Attachment, DebugTool, FormCheckbox, FormCheckboxButton, FormDatePicker, FormDateRangePicker, FormSearchJobField, FormSegmentGroup, FormSelect, FormTextField, JobSearchModal, StepIndicator, resize, testSignatureBase64Data, useAddressComponent, useCamera, useCanvasPaint, useJobVehicleSearchModal, useSearchAddress };
1550
2620
  //# sourceMappingURL=index.esm.js.map