@rubenpazch/patient-search 2.0.0

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/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # PatientSearch
2
+
3
+ Generated component package.
@@ -0,0 +1,35 @@
1
+ import React from "react";
2
+ export type SearchSize = "sm" | "md" | "lg";
3
+ export type PatientSearchPatient = {
4
+ id: string | number;
5
+ first_name: string;
6
+ last_name: string;
7
+ email?: string | null;
8
+ phone?: string | null;
9
+ dni?: string | null;
10
+ active: boolean;
11
+ };
12
+ export type PatientSearchLabels = {
13
+ searchPlaceholder: string;
14
+ resultsTitle: string;
15
+ activeStatus: string;
16
+ inactiveStatus: string;
17
+ noResultsTitle: string;
18
+ noResultsHint: string;
19
+ createNewPatient: string;
20
+ withSearchTerm: string;
21
+ dniLabel: string;
22
+ };
23
+ interface PatientSearchProps {
24
+ onSelectPatient: (patient: PatientSearchPatient) => void;
25
+ onSearchPatients?: (searchTerm: string) => Promise<{
26
+ patients?: PatientSearchPatient[];
27
+ } | PatientSearchPatient[]>;
28
+ onCreateNewPatient?: (searchTerm: string) => void;
29
+ labels: PatientSearchLabels;
30
+ size?: SearchSize;
31
+ initialSearchTerm?: string;
32
+ }
33
+ declare const PatientSearch: React.FC<PatientSearchProps>;
34
+ export default PatientSearch;
35
+ //# sourceMappingURL=PatientSearch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PatientSearch.d.ts","sourceRoot":"","sources":["../src/PatientSearch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAO3D,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,UAAU,kBAAkB;IAC1B,eAAe,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACzD,gBAAgB,CAAC,EAAE,CACjB,UAAU,EAAE,MAAM,KACf,OAAO,CAAC;QAAE,QAAQ,CAAC,EAAE,oBAAoB,EAAE,CAAA;KAAE,GAAG,oBAAoB,EAAE,CAAC,CAAC;IAC7E,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,MAAM,EAAE,mBAAmB,CAAC;IAC5B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA8Q/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,595 @@
1
+ 'use strict';
2
+
3
+ var require$$0 = require('react');
4
+
5
+ function _interopNamespaceDefault(e) {
6
+ var n = Object.create(null);
7
+ if (e) {
8
+ Object.keys(e).forEach(function (k) {
9
+ if (k !== 'default') {
10
+ var d = Object.getOwnPropertyDescriptor(e, k);
11
+ Object.defineProperty(n, k, d.get ? d : {
12
+ enumerable: true,
13
+ get: function () { return e[k]; }
14
+ });
15
+ }
16
+ });
17
+ }
18
+ n.default = e;
19
+ return Object.freeze(n);
20
+ }
21
+
22
+ var require$$0__namespace = /*#__PURE__*/_interopNamespaceDefault(require$$0);
23
+
24
+ var jsxRuntime = {exports: {}};
25
+
26
+ var reactJsxRuntime_production = {};
27
+
28
+ /**
29
+ * @license React
30
+ * react-jsx-runtime.production.js
31
+ *
32
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
33
+ *
34
+ * This source code is licensed under the MIT license found in the
35
+ * LICENSE file in the root directory of this source tree.
36
+ */
37
+
38
+ var hasRequiredReactJsxRuntime_production;
39
+
40
+ function requireReactJsxRuntime_production () {
41
+ if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
42
+ hasRequiredReactJsxRuntime_production = 1;
43
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
44
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
45
+ function jsxProd(type, config, maybeKey) {
46
+ var key = null;
47
+ void 0 !== maybeKey && (key = "" + maybeKey);
48
+ void 0 !== config.key && (key = "" + config.key);
49
+ if ("key" in config) {
50
+ maybeKey = {};
51
+ for (var propName in config)
52
+ "key" !== propName && (maybeKey[propName] = config[propName]);
53
+ } else maybeKey = config;
54
+ config = maybeKey.ref;
55
+ return {
56
+ $$typeof: REACT_ELEMENT_TYPE,
57
+ type: type,
58
+ key: key,
59
+ ref: void 0 !== config ? config : null,
60
+ props: maybeKey
61
+ };
62
+ }
63
+ reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
64
+ reactJsxRuntime_production.jsx = jsxProd;
65
+ reactJsxRuntime_production.jsxs = jsxProd;
66
+ return reactJsxRuntime_production;
67
+ }
68
+
69
+ var reactJsxRuntime_development = {};
70
+
71
+ /**
72
+ * @license React
73
+ * react-jsx-runtime.development.js
74
+ *
75
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
76
+ *
77
+ * This source code is licensed under the MIT license found in the
78
+ * LICENSE file in the root directory of this source tree.
79
+ */
80
+
81
+ var hasRequiredReactJsxRuntime_development;
82
+
83
+ function requireReactJsxRuntime_development () {
84
+ if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
85
+ hasRequiredReactJsxRuntime_development = 1;
86
+ "production" !== process.env.NODE_ENV &&
87
+ (function () {
88
+ function getComponentNameFromType(type) {
89
+ if (null == type) return null;
90
+ if ("function" === typeof type)
91
+ return type.$$typeof === REACT_CLIENT_REFERENCE
92
+ ? null
93
+ : type.displayName || type.name || null;
94
+ if ("string" === typeof type) return type;
95
+ switch (type) {
96
+ case REACT_FRAGMENT_TYPE:
97
+ return "Fragment";
98
+ case REACT_PROFILER_TYPE:
99
+ return "Profiler";
100
+ case REACT_STRICT_MODE_TYPE:
101
+ return "StrictMode";
102
+ case REACT_SUSPENSE_TYPE:
103
+ return "Suspense";
104
+ case REACT_SUSPENSE_LIST_TYPE:
105
+ return "SuspenseList";
106
+ case REACT_ACTIVITY_TYPE:
107
+ return "Activity";
108
+ }
109
+ if ("object" === typeof type)
110
+ switch (
111
+ ("number" === typeof type.tag &&
112
+ console.error(
113
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
114
+ ),
115
+ type.$$typeof)
116
+ ) {
117
+ case REACT_PORTAL_TYPE:
118
+ return "Portal";
119
+ case REACT_CONTEXT_TYPE:
120
+ return type.displayName || "Context";
121
+ case REACT_CONSUMER_TYPE:
122
+ return (type._context.displayName || "Context") + ".Consumer";
123
+ case REACT_FORWARD_REF_TYPE:
124
+ var innerType = type.render;
125
+ type = type.displayName;
126
+ type ||
127
+ ((type = innerType.displayName || innerType.name || ""),
128
+ (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
129
+ return type;
130
+ case REACT_MEMO_TYPE:
131
+ return (
132
+ (innerType = type.displayName || null),
133
+ null !== innerType
134
+ ? innerType
135
+ : getComponentNameFromType(type.type) || "Memo"
136
+ );
137
+ case REACT_LAZY_TYPE:
138
+ innerType = type._payload;
139
+ type = type._init;
140
+ try {
141
+ return getComponentNameFromType(type(innerType));
142
+ } catch (x) {}
143
+ }
144
+ return null;
145
+ }
146
+ function testStringCoercion(value) {
147
+ return "" + value;
148
+ }
149
+ function checkKeyStringCoercion(value) {
150
+ try {
151
+ testStringCoercion(value);
152
+ var JSCompiler_inline_result = !1;
153
+ } catch (e) {
154
+ JSCompiler_inline_result = true;
155
+ }
156
+ if (JSCompiler_inline_result) {
157
+ JSCompiler_inline_result = console;
158
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
159
+ var JSCompiler_inline_result$jscomp$0 =
160
+ ("function" === typeof Symbol &&
161
+ Symbol.toStringTag &&
162
+ value[Symbol.toStringTag]) ||
163
+ value.constructor.name ||
164
+ "Object";
165
+ JSCompiler_temp_const.call(
166
+ JSCompiler_inline_result,
167
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
168
+ JSCompiler_inline_result$jscomp$0
169
+ );
170
+ return testStringCoercion(value);
171
+ }
172
+ }
173
+ function getTaskName(type) {
174
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
175
+ if (
176
+ "object" === typeof type &&
177
+ null !== type &&
178
+ type.$$typeof === REACT_LAZY_TYPE
179
+ )
180
+ return "<...>";
181
+ try {
182
+ var name = getComponentNameFromType(type);
183
+ return name ? "<" + name + ">" : "<...>";
184
+ } catch (x) {
185
+ return "<...>";
186
+ }
187
+ }
188
+ function getOwner() {
189
+ var dispatcher = ReactSharedInternals.A;
190
+ return null === dispatcher ? null : dispatcher.getOwner();
191
+ }
192
+ function UnknownOwner() {
193
+ return Error("react-stack-top-frame");
194
+ }
195
+ function hasValidKey(config) {
196
+ if (hasOwnProperty.call(config, "key")) {
197
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
198
+ if (getter && getter.isReactWarning) return false;
199
+ }
200
+ return void 0 !== config.key;
201
+ }
202
+ function defineKeyPropWarningGetter(props, displayName) {
203
+ function warnAboutAccessingKey() {
204
+ specialPropKeyWarningShown ||
205
+ ((specialPropKeyWarningShown = true),
206
+ console.error(
207
+ "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
208
+ displayName
209
+ ));
210
+ }
211
+ warnAboutAccessingKey.isReactWarning = true;
212
+ Object.defineProperty(props, "key", {
213
+ get: warnAboutAccessingKey,
214
+ configurable: true
215
+ });
216
+ }
217
+ function elementRefGetterWithDeprecationWarning() {
218
+ var componentName = getComponentNameFromType(this.type);
219
+ didWarnAboutElementRef[componentName] ||
220
+ ((didWarnAboutElementRef[componentName] = true),
221
+ console.error(
222
+ "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
223
+ ));
224
+ componentName = this.props.ref;
225
+ return void 0 !== componentName ? componentName : null;
226
+ }
227
+ function ReactElement(type, key, props, owner, debugStack, debugTask) {
228
+ var refProp = props.ref;
229
+ type = {
230
+ $$typeof: REACT_ELEMENT_TYPE,
231
+ type: type,
232
+ key: key,
233
+ props: props,
234
+ _owner: owner
235
+ };
236
+ null !== (void 0 !== refProp ? refProp : null)
237
+ ? Object.defineProperty(type, "ref", {
238
+ enumerable: false,
239
+ get: elementRefGetterWithDeprecationWarning
240
+ })
241
+ : Object.defineProperty(type, "ref", { enumerable: false, value: null });
242
+ type._store = {};
243
+ Object.defineProperty(type._store, "validated", {
244
+ configurable: false,
245
+ enumerable: false,
246
+ writable: true,
247
+ value: 0
248
+ });
249
+ Object.defineProperty(type, "_debugInfo", {
250
+ configurable: false,
251
+ enumerable: false,
252
+ writable: true,
253
+ value: null
254
+ });
255
+ Object.defineProperty(type, "_debugStack", {
256
+ configurable: false,
257
+ enumerable: false,
258
+ writable: true,
259
+ value: debugStack
260
+ });
261
+ Object.defineProperty(type, "_debugTask", {
262
+ configurable: false,
263
+ enumerable: false,
264
+ writable: true,
265
+ value: debugTask
266
+ });
267
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
268
+ return type;
269
+ }
270
+ function jsxDEVImpl(
271
+ type,
272
+ config,
273
+ maybeKey,
274
+ isStaticChildren,
275
+ debugStack,
276
+ debugTask
277
+ ) {
278
+ var children = config.children;
279
+ if (void 0 !== children)
280
+ if (isStaticChildren)
281
+ if (isArrayImpl(children)) {
282
+ for (
283
+ isStaticChildren = 0;
284
+ isStaticChildren < children.length;
285
+ isStaticChildren++
286
+ )
287
+ validateChildKeys(children[isStaticChildren]);
288
+ Object.freeze && Object.freeze(children);
289
+ } else
290
+ console.error(
291
+ "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
292
+ );
293
+ else validateChildKeys(children);
294
+ if (hasOwnProperty.call(config, "key")) {
295
+ children = getComponentNameFromType(type);
296
+ var keys = Object.keys(config).filter(function (k) {
297
+ return "key" !== k;
298
+ });
299
+ isStaticChildren =
300
+ 0 < keys.length
301
+ ? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
302
+ : "{key: someKey}";
303
+ didWarnAboutKeySpread[children + isStaticChildren] ||
304
+ ((keys =
305
+ 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
306
+ console.error(
307
+ 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
308
+ isStaticChildren,
309
+ children,
310
+ keys,
311
+ children
312
+ ),
313
+ (didWarnAboutKeySpread[children + isStaticChildren] = true));
314
+ }
315
+ children = null;
316
+ void 0 !== maybeKey &&
317
+ (checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
318
+ hasValidKey(config) &&
319
+ (checkKeyStringCoercion(config.key), (children = "" + config.key));
320
+ if ("key" in config) {
321
+ maybeKey = {};
322
+ for (var propName in config)
323
+ "key" !== propName && (maybeKey[propName] = config[propName]);
324
+ } else maybeKey = config;
325
+ children &&
326
+ defineKeyPropWarningGetter(
327
+ maybeKey,
328
+ "function" === typeof type
329
+ ? type.displayName || type.name || "Unknown"
330
+ : type
331
+ );
332
+ return ReactElement(
333
+ type,
334
+ children,
335
+ maybeKey,
336
+ getOwner(),
337
+ debugStack,
338
+ debugTask
339
+ );
340
+ }
341
+ function validateChildKeys(node) {
342
+ isValidElement(node)
343
+ ? node._store && (node._store.validated = 1)
344
+ : "object" === typeof node &&
345
+ null !== node &&
346
+ node.$$typeof === REACT_LAZY_TYPE &&
347
+ ("fulfilled" === node._payload.status
348
+ ? isValidElement(node._payload.value) &&
349
+ node._payload.value._store &&
350
+ (node._payload.value._store.validated = 1)
351
+ : node._store && (node._store.validated = 1));
352
+ }
353
+ function isValidElement(object) {
354
+ return (
355
+ "object" === typeof object &&
356
+ null !== object &&
357
+ object.$$typeof === REACT_ELEMENT_TYPE
358
+ );
359
+ }
360
+ var React = require$$0,
361
+ REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
362
+ REACT_PORTAL_TYPE = Symbol.for("react.portal"),
363
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
364
+ REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
365
+ REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
366
+ REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
367
+ REACT_CONTEXT_TYPE = Symbol.for("react.context"),
368
+ REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
369
+ REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
370
+ REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
371
+ REACT_MEMO_TYPE = Symbol.for("react.memo"),
372
+ REACT_LAZY_TYPE = Symbol.for("react.lazy"),
373
+ REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
374
+ REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
375
+ ReactSharedInternals =
376
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
377
+ hasOwnProperty = Object.prototype.hasOwnProperty,
378
+ isArrayImpl = Array.isArray,
379
+ createTask = console.createTask
380
+ ? console.createTask
381
+ : function () {
382
+ return null;
383
+ };
384
+ React = {
385
+ react_stack_bottom_frame: function (callStackForError) {
386
+ return callStackForError();
387
+ }
388
+ };
389
+ var specialPropKeyWarningShown;
390
+ var didWarnAboutElementRef = {};
391
+ var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
392
+ React,
393
+ UnknownOwner
394
+ )();
395
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
396
+ var didWarnAboutKeySpread = {};
397
+ reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
398
+ reactJsxRuntime_development.jsx = function (type, config, maybeKey) {
399
+ var trackActualOwner =
400
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
401
+ return jsxDEVImpl(
402
+ type,
403
+ config,
404
+ maybeKey,
405
+ false,
406
+ trackActualOwner
407
+ ? Error("react-stack-top-frame")
408
+ : unknownOwnerDebugStack,
409
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
410
+ );
411
+ };
412
+ reactJsxRuntime_development.jsxs = function (type, config, maybeKey) {
413
+ var trackActualOwner =
414
+ 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
415
+ return jsxDEVImpl(
416
+ type,
417
+ config,
418
+ maybeKey,
419
+ true,
420
+ trackActualOwner
421
+ ? Error("react-stack-top-frame")
422
+ : unknownOwnerDebugStack,
423
+ trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
424
+ );
425
+ };
426
+ })();
427
+ return reactJsxRuntime_development;
428
+ }
429
+
430
+ var hasRequiredJsxRuntime;
431
+
432
+ function requireJsxRuntime () {
433
+ if (hasRequiredJsxRuntime) return jsxRuntime.exports;
434
+ hasRequiredJsxRuntime = 1;
435
+
436
+ if (process.env.NODE_ENV === 'production') {
437
+ jsxRuntime.exports = requireReactJsxRuntime_production();
438
+ } else {
439
+ jsxRuntime.exports = requireReactJsxRuntime_development();
440
+ }
441
+ return jsxRuntime.exports;
442
+ }
443
+
444
+ var jsxRuntimeExports = requireJsxRuntime();
445
+
446
+ var r,o={exports:{}},t={};var l,n,a={};
447
+ /**
448
+ * @license React
449
+ * react-jsx-runtime.development.js
450
+ *
451
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
452
+ *
453
+ * This source code is licensed under the MIT license found in the
454
+ * LICENSE file in the root directory of this source tree.
455
+ */function i(){return l||(l=1,"production"!==process.env.NODE_ENV&&function(){function e(s){if(null==s)return null;if("function"==typeof s)return s.$$typeof===M?null:s.displayName||s.name||null;if("string"==typeof s)return s;switch(s){case x:return "Fragment";case p:return "Profiler";case v:return "StrictMode";case f:return "Suspense";case C:return "SuspenseList";case N:return "Activity"}if("object"==typeof s)switch("number"==typeof s.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),s.$$typeof){case u:return "Portal";case j:return s.displayName||"Context";case g:return (s._context.displayName||"Context")+".Consumer";case k:var r=s.render;return (s=s.displayName)||(s=""!==(s=r.displayName||r.name||"")?"ForwardRef("+s+")":"ForwardRef"),s;case L:return null!==(r=s.displayName||null)?r:e(s.type)||"Memo";case y:r=s._payload,s=s._init;try{return e(s(r))}catch(e){}}return null}function r(e){return ""+e}function o(e){try{r(e);var s=!1;}catch(e){s=true;}if(s){var o=(s=console).error,t="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(s,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",t),r(e)}}function t(s){if(s===x)return "<>";if("object"==typeof s&&null!==s&&s.$$typeof===y)return "<...>";try{var r=e(s);return r?"<"+r+">":"<...>"}catch(e){return "<...>"}}function l(){return Error("react-stack-top-frame")}function n(){var s=e(this.type);return B[s]||(B[s]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(s=this.props.ref)?s:null}function i(s,r,t,l,a,i){var h,m=r.children;if(void 0!==m)if(l)if(z(m)){for(l=0;l<m.length;l++)c(m[l]);Object.freeze&&Object.freeze(m);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else c(m);if(b.call(r,"key")){m=e(s);var u=Object.keys(r).filter(function(e){return "key"!==e});l=0<u.length?"{key: someKey, "+u.join(": ..., ")+": ...}":"{key: someKey}",W[m+l]||(u=0<u.length?"{"+u.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',l,m,u,m),W[m+l]=true);}if(m=null,void 0!==t&&(o(t),m=""+t),function(e){if(b.call(e,"key")){var s=Object.getOwnPropertyDescriptor(e,"key").get;if(s&&s.isReactWarning)return false}return void 0!==e.key}(r)&&(o(r.key),m=""+r.key),"key"in r)for(var x in t={},r)"key"!==x&&(t[x]=r[x]);else t=r;return m&&function(e,s){function r(){d||(d=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",s));}r.isReactWarning=true,Object.defineProperty(e,"key",{get:r,configurable:true});}(t,"function"==typeof s?s.displayName||s.name||"Unknown":s),function(e,s,r,o,t,l){var a=r.ref;return e={$$typeof:w,type:e,key:s,props:r,_owner:o},null!==(void 0!==a?a:null)?Object.defineProperty(e,"ref",{enumerable:false,get:n}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:t}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:l}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(s,m,t,null===(h=$.A)?null:h.getOwner(),a,i)}function c(e){h(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===y&&("fulfilled"===e._payload.status?h(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function h(e){return "object"==typeof e&&null!==e&&e.$$typeof===w}var d,m=require$$0,w=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),j=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),M=Symbol.for("react.client.reference"),$=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,b=Object.prototype.hasOwnProperty,z=Array.isArray,H=console.createTask?console.createTask:function(){return null},B={},V=(m={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(m,l)(),Z=H(t(l)),W={};a.Fragment=x,a.jsx=function(e,s,r){var o=1e4>$.recentlyCreatedOwnerStacks++;return i(e,s,r,false,o?Error("react-stack-top-frame"):V,o?H(t(e)):Z)},a.jsxs=function(e,s,r){var o=1e4>$.recentlyCreatedOwnerStacks++;return i(e,s,r,true,o?Error("react-stack-top-frame"):V,o?H(t(e)):Z)};}()),a}var c=(n||(n=1,"production"===process.env.NODE_ENV?o.exports=function(){if(r)return t;r=1;var e=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function o(s,r,o){var t=null;if(void 0!==o&&(t=""+o),void 0!==r.key&&(t=""+r.key),"key"in r)for(var l in o={},r)"key"!==l&&(o[l]=r[l]);else o=r;return r=o.ref,{$$typeof:e,type:s,key:t,ref:void 0!==r?r:null,props:o}}return t.Fragment=s,t.jsx=o,t.jsxs=o,t}():o.exports=i()),o.exports);function Ce({className:e="",size:s="md"}){const r=`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[s]} ${e}`;return c.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:r,"aria-label":"Plus",children:c.jsx("path",{d:"M12 4v16m8-8H4"})})}const He=({className:e="",size:s="md",color:r="currentColor"})=>c.jsxs("svg",{className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[s]} animate-spin ${e}`,fill:"none",stroke:r,viewBox:"0 0 24 24",children:[c.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),c.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});const Ee=({className:e="",size:s="md",color:r="currentColor"})=>c.jsxs("svg",{className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[s]} ${e}`,fill:"none",stroke:r,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[c.jsx("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),c.jsx("circle",{cx:"12",cy:"7",r:"4"})]});const Xe={outlined:"material-symbols-outlined",rounded:"material-symbols-rounded",sharp:"material-symbols-sharp"},Ye=require$$0__namespace.forwardRef(({name:e,variant:s="outlined",size:r="md",fill:o=0,weight:t=400,grade:l=0,opticalSize:n=24,style:a,className:i,...h},d)=>{const m=(e=>"number"==typeof e?e:"sm"===e?16:"md"===e?20:24)(r),w=`"FILL" ${o}, "wght" ${t}, "GRAD" ${l}, "opsz" ${n}`;return c.jsx("span",{ref:d,"aria-hidden":"true",className:Xe[s]+(i?` ${i}`:""),style:{fontVariationSettings:w,fontSize:m,lineHeight:1,display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",...a},...h,children:e})});Ye.displayName="MaterialIcon";
456
+
457
+ function styleInject(css, ref) {
458
+ if ( ref === void 0 ) ref = {};
459
+ var insertAt = ref.insertAt;
460
+
461
+ if (typeof document === 'undefined') { return; }
462
+
463
+ var head = document.head || document.getElementsByTagName('head')[0];
464
+ var style = document.createElement('style');
465
+ style.type = 'text/css';
466
+
467
+ if (insertAt === 'top') {
468
+ if (head.firstChild) {
469
+ head.insertBefore(style, head.firstChild);
470
+ } else {
471
+ head.appendChild(style);
472
+ }
473
+ } else {
474
+ head.appendChild(style);
475
+ }
476
+
477
+ if (style.styleSheet) {
478
+ style.styleSheet.cssText = css;
479
+ } else {
480
+ style.appendChild(document.createTextNode(css));
481
+ }
482
+ }
483
+
484
+ var css_248z = ".PatientSearch-module_root__zTVVD {\n position: relative;\n width: 100%;\n}\n\n.PatientSearch-module_sizeSM__03j3N {\n max-width: 24rem;\n}\n\n.PatientSearch-module_sizeMD__nBLGE {\n max-width: 42rem;\n}\n\n.PatientSearch-module_sizeLG__XrG-E {\n max-width: 48rem;\n}\n\n.PatientSearch-module_inputWrapper__p4A5i {\n position: relative;\n}\n\n.PatientSearch-module_iconWrapper__3ALRt {\n position: absolute;\n inset-block: 0;\n left: 0;\n display: flex;\n align-items: center;\n padding-left: 0.75rem;\n pointer-events: none;\n}\n\n.PatientSearch-module_icon__Y7R4n {\n color: #9ca3af;\n}\n\n.PatientSearch-module_iconSM__igbM5 {\n width: 1.25rem;\n height: 1.25rem;\n}\n\n.PatientSearch-module_iconMD__X6PHz {\n width: 1.5rem;\n height: 1.5rem;\n}\n\n.PatientSearch-module_iconLG__2hcLU {\n width: 1.75rem;\n height: 1.75rem;\n}\n\n.PatientSearch-module_input__rf8h4 {\n width: 100%;\n border: 2px solid #d1d5db;\n border-radius: 0.5rem;\n outline: none;\n background: #ffffff;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n color: #111827;\n}\n\n.PatientSearch-module_input__rf8h4:focus {\n border-color: transparent;\n box-shadow: 0 0 0 2px #3b82f6;\n}\n\n.PatientSearch-module_inputSM__dOHod {\n padding: 0.5rem 1rem 0.5rem 2.5rem;\n font-size: 0.875rem;\n}\n\n.PatientSearch-module_inputMD__qsc7w {\n padding: 0.75rem 1rem 0.75rem 3rem;\n font-size: 1rem;\n}\n\n.PatientSearch-module_inputLG__nSshn {\n padding: 1rem 1rem 1rem 3.5rem;\n font-size: 1.125rem;\n}\n\n.PatientSearch-module_spinnerWrapper__hQ2-M {\n position: absolute;\n inset-block: 0;\n right: 0;\n display: flex;\n align-items: center;\n padding-right: 1rem;\n}\n\n.PatientSearch-module_spinner__K-4tv {\n color: #2563eb;\n}\n\n.PatientSearch-module_dropdown__dXnOa {\n position: absolute;\n z-index: 50;\n width: 100%;\n margin-top: 0.5rem;\n background: #ffffff;\n border-radius: 0.75rem;\n border: 1px solid #e5e7eb;\n box-shadow:\n 0 20px 25px -5px rgba(0, 0, 0, 0.1),\n 0 10px 10px -5px rgba(0, 0, 0, 0.04);\n max-height: 24rem;\n overflow-y: auto;\n}\n\n.PatientSearch-module_resultsHeader__AVkCQ {\n padding: 0.5rem 1rem;\n font-size: 0.75rem;\n font-weight: 600;\n text-transform: uppercase;\n color: #6b7280;\n background: #f9fafb;\n}\n\n.PatientSearch-module_resultButton__RNO53 {\n width: 100%;\n padding: 0.75rem 1rem;\n text-align: left;\n background: transparent;\n border: none;\n border-bottom: 1px solid #f3f4f6;\n cursor: pointer;\n transition: background-color 0.2s ease;\n}\n\n.PatientSearch-module_resultButton__RNO53:hover {\n background: #eff6ff;\n}\n\n.PatientSearch-module_resultButtonHighlighted__QIaEZ {\n background: #eff6ff;\n}\n\n.PatientSearch-module_resultContent__s48zw {\n display: flex;\n align-items: center;\n gap: 0.75rem;\n}\n\n.PatientSearch-module_avatar__Yc4OV {\n width: 2.5rem;\n height: 2.5rem;\n background: #dbeafe;\n border-radius: 9999px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n.PatientSearch-module_avatarText__vT-d7 {\n color: #2563eb;\n font-weight: 500;\n font-size: 0.875rem;\n}\n\n.PatientSearch-module_resultDetails__x-w5D {\n flex: 1;\n min-width: 0;\n}\n\n.PatientSearch-module_patientName__nmkyN {\n font-size: 0.875rem;\n font-weight: 500;\n color: #111827;\n margin: 0;\n}\n\n.PatientSearch-module_patientEmail__1W1LS {\n font-size: 0.875rem;\n color: #6b7280;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n margin: 0;\n}\n\n.PatientSearch-module_patientDni__dFO7a {\n font-size: 0.75rem;\n color: #9ca3af;\n margin: 0;\n}\n\n.PatientSearch-module_statusBadge__FbiKb {\n display: inline-flex;\n align-items: center;\n padding: 0.125rem 0.625rem;\n border-radius: 9999px;\n font-size: 0.75rem;\n font-weight: 500;\n}\n\n.PatientSearch-module_statusActive__Z0Ag1 {\n background: #d1fae5;\n color: #065f46;\n}\n\n.PatientSearch-module_statusInactive__BI2SM {\n background: #f3f4f6;\n color: #1f2937;\n}\n\n.PatientSearch-module_noResults__kLmFF {\n padding: 2rem 1rem;\n text-align: center;\n}\n\n.PatientSearch-module_noResultsIcon__ld0Ry {\n margin: 0 auto;\n color: #9ca3af;\n}\n\n.PatientSearch-module_noResultsTitle__CKFA8 {\n margin-top: 0.5rem;\n font-size: 0.875rem;\n color: #4b5563;\n}\n\n.PatientSearch-module_noResultsHint__5GF6i {\n margin-top: 0.25rem;\n font-size: 0.75rem;\n color: #6b7280;\n}\n\n.PatientSearch-module_createButton__zmTRQ {\n width: 100%;\n padding: 0.75rem 1rem;\n text-align: left;\n background: transparent;\n border: none;\n border-top: 2px solid #e5e7eb;\n cursor: pointer;\n transition: background-color 0.2s ease;\n}\n\n.PatientSearch-module_createButton__zmTRQ:hover {\n background: #ecfdf3;\n}\n\n.PatientSearch-module_createButtonHighlighted__mJSvX {\n background: #ecfdf3;\n}\n\n.PatientSearch-module_createContent__AjXGO {\n display: flex;\n align-items: center;\n gap: 0.75rem;\n}\n\n.PatientSearch-module_createIconWrapper__epP2f {\n width: 2.5rem;\n height: 2.5rem;\n background: #dcfce7;\n border-radius: 9999px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.PatientSearch-module_createIcon__DlnY3 {\n color: #16a34a;\n}\n\n.PatientSearch-module_createTitle__Ai46p {\n font-size: 0.875rem;\n font-weight: 500;\n color: #16a34a;\n margin: 0;\n}\n\n.PatientSearch-module_createSubtitle__2wYqU {\n margin-top: 0.125rem;\n font-size: 0.75rem;\n color: #6b7280;\n}\n\n.PatientSearch-module_highlight__61pMO {\n background: #fde68a;\n font-weight: 600;\n}\n";
485
+ var styles = {"root":"PatientSearch-module_root__zTVVD","sizeSM":"PatientSearch-module_sizeSM__03j3N","sizeMD":"PatientSearch-module_sizeMD__nBLGE","sizeLG":"PatientSearch-module_sizeLG__XrG-E","inputWrapper":"PatientSearch-module_inputWrapper__p4A5i","iconWrapper":"PatientSearch-module_iconWrapper__3ALRt","icon":"PatientSearch-module_icon__Y7R4n","iconSM":"PatientSearch-module_iconSM__igbM5","iconMD":"PatientSearch-module_iconMD__X6PHz","iconLG":"PatientSearch-module_iconLG__2hcLU","input":"PatientSearch-module_input__rf8h4","inputSM":"PatientSearch-module_inputSM__dOHod","inputMD":"PatientSearch-module_inputMD__qsc7w","inputLG":"PatientSearch-module_inputLG__nSshn","spinnerWrapper":"PatientSearch-module_spinnerWrapper__hQ2-M","spinner":"PatientSearch-module_spinner__K-4tv","dropdown":"PatientSearch-module_dropdown__dXnOa","resultsHeader":"PatientSearch-module_resultsHeader__AVkCQ","resultButton":"PatientSearch-module_resultButton__RNO53","resultButtonHighlighted":"PatientSearch-module_resultButtonHighlighted__QIaEZ","resultContent":"PatientSearch-module_resultContent__s48zw","avatar":"PatientSearch-module_avatar__Yc4OV","avatarText":"PatientSearch-module_avatarText__vT-d7","resultDetails":"PatientSearch-module_resultDetails__x-w5D","patientName":"PatientSearch-module_patientName__nmkyN","patientEmail":"PatientSearch-module_patientEmail__1W1LS","patientDni":"PatientSearch-module_patientDni__dFO7a","statusBadge":"PatientSearch-module_statusBadge__FbiKb","statusActive":"PatientSearch-module_statusActive__Z0Ag1","statusInactive":"PatientSearch-module_statusInactive__BI2SM","noResults":"PatientSearch-module_noResults__kLmFF","noResultsIcon":"PatientSearch-module_noResultsIcon__ld0Ry","noResultsTitle":"PatientSearch-module_noResultsTitle__CKFA8","noResultsHint":"PatientSearch-module_noResultsHint__5GF6i","createButton":"PatientSearch-module_createButton__zmTRQ","createButtonHighlighted":"PatientSearch-module_createButtonHighlighted__mJSvX","createContent":"PatientSearch-module_createContent__AjXGO","createIconWrapper":"PatientSearch-module_createIconWrapper__epP2f","createIcon":"PatientSearch-module_createIcon__DlnY3","createTitle":"PatientSearch-module_createTitle__Ai46p","createSubtitle":"PatientSearch-module_createSubtitle__2wYqU","highlight":"PatientSearch-module_highlight__61pMO"};
486
+ styleInject(css_248z);
487
+
488
+ const classNames = (...classes) => classes.filter(Boolean).join(" ");
489
+ const PatientSearch = ({ onSelectPatient, onSearchPatients, onCreateNewPatient, labels, size = "md", initialSearchTerm = "", }) => {
490
+ const [searchTerm, setSearchTerm] = require$$0.useState(initialSearchTerm);
491
+ const [results, setResults] = require$$0.useState([]);
492
+ const [isOpen, setIsOpen] = require$$0.useState(false);
493
+ const [loading, setLoading] = require$$0.useState(false);
494
+ const [highlightedIndex, setHighlightedIndex] = require$$0.useState(-1);
495
+ const searchRef = require$$0.useRef(null);
496
+ // Close dropdown when clicking outside
497
+ require$$0.useEffect(() => {
498
+ const handleClickOutside = (event) => {
499
+ if (searchRef.current &&
500
+ !searchRef.current.contains(event.target)) {
501
+ setIsOpen(false);
502
+ }
503
+ };
504
+ document.addEventListener("mousedown", handleClickOutside);
505
+ return () => document.removeEventListener("mousedown", handleClickOutside);
506
+ }, []);
507
+ // Search patients
508
+ require$$0.useEffect(() => {
509
+ const searchPatients = async () => {
510
+ if (searchTerm.trim().length < 2) {
511
+ setResults([]);
512
+ setIsOpen(false);
513
+ return;
514
+ }
515
+ setLoading(true);
516
+ setIsOpen(true);
517
+ try {
518
+ if (!onSearchPatients) {
519
+ setResults([]);
520
+ return;
521
+ }
522
+ const response = await onSearchPatients(searchTerm);
523
+ const patients = Array.isArray(response)
524
+ ? response
525
+ : response?.patients;
526
+ setResults(patients ?? []);
527
+ }
528
+ catch (error) {
529
+ setResults([]);
530
+ }
531
+ finally {
532
+ setLoading(false);
533
+ }
534
+ };
535
+ const debounceTimer = setTimeout(searchPatients, 300);
536
+ return () => clearTimeout(debounceTimer);
537
+ }, [searchTerm]);
538
+ // Keyboard navigation
539
+ const handleKeyDown = (e) => {
540
+ if (!isOpen)
541
+ return;
542
+ switch (e.key) {
543
+ case "ArrowDown":
544
+ e.preventDefault();
545
+ setHighlightedIndex((prev) => prev < results.length ? prev + 1 : prev);
546
+ break;
547
+ case "ArrowUp":
548
+ e.preventDefault();
549
+ setHighlightedIndex((prev) => (prev > -1 ? prev - 1 : -1));
550
+ break;
551
+ case "Enter":
552
+ e.preventDefault();
553
+ if (highlightedIndex === -1 || highlightedIndex === results.length) {
554
+ // Create new patient
555
+ onCreateNewPatient?.(searchTerm);
556
+ }
557
+ else if (highlightedIndex >= 0 && highlightedIndex < results.length) {
558
+ // Select highlighted patient
559
+ onSelectPatient(results[highlightedIndex]);
560
+ setIsOpen(false);
561
+ setSearchTerm("");
562
+ }
563
+ break;
564
+ case "Escape":
565
+ setIsOpen(false);
566
+ break;
567
+ }
568
+ };
569
+ const handleSelectPatient = (patient) => {
570
+ onSelectPatient(patient);
571
+ setIsOpen(false);
572
+ setSearchTerm("");
573
+ setHighlightedIndex(-1);
574
+ };
575
+ const handleCreateNew = () => {
576
+ onCreateNewPatient?.(searchTerm);
577
+ };
578
+ const highlightMatch = (text, search) => {
579
+ if (!search.trim())
580
+ return text;
581
+ const regex = new RegExp(`(${search})`, "gi");
582
+ const parts = text.split(regex);
583
+ return parts.map((part, index) => regex.test(part) ? (jsxRuntimeExports.jsx("mark", { className: styles.highlight, children: part }, index)) : (part));
584
+ };
585
+ return (jsxRuntimeExports.jsxs("div", { ref: searchRef, className: classNames(styles.root, styles[`size${size.toUpperCase()}`]), children: [jsxRuntimeExports.jsxs("div", { className: styles.inputWrapper, children: [jsxRuntimeExports.jsx("div", { className: styles.iconWrapper, children: jsxRuntimeExports.jsx("svg", { className: classNames(styles.icon, styles[`icon${size.toUpperCase()}`]), fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: jsxRuntimeExports.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" }) }) }), jsxRuntimeExports.jsx("input", { type: "text", value: searchTerm, onChange: (e) => setSearchTerm(e.target.value), onKeyDown: handleKeyDown, onFocus: () => searchTerm.length >= 2 && setIsOpen(true), placeholder: labels.searchPlaceholder, className: classNames(styles.input, styles[`input${size.toUpperCase()}`]) }), loading && (jsxRuntimeExports.jsx("div", { className: styles.spinnerWrapper, children: jsxRuntimeExports.jsx(He, { size: "md", className: styles.spinner }) }))] }), isOpen && searchTerm.length >= 2 && (jsxRuntimeExports.jsxs("div", { className: styles.dropdown, children: [results.length > 0 ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsxs("div", { className: styles.resultsHeader, children: [labels.resultsTitle, ": ", results.length, " ", results.length === 1 ? "" : "s"] }), results.map((patient, index) => (jsxRuntimeExports.jsx("button", { onClick: () => handleSelectPatient(patient), onMouseEnter: () => setHighlightedIndex(index), className: classNames(styles.resultButton, highlightedIndex === index &&
586
+ styles.resultButtonHighlighted), children: jsxRuntimeExports.jsxs("div", { className: styles.resultContent, children: [jsxRuntimeExports.jsx("div", { className: styles.avatar, children: jsxRuntimeExports.jsxs("span", { className: styles.avatarText, children: [patient.first_name.charAt(0), patient.last_name.charAt(0)] }) }), jsxRuntimeExports.jsxs("div", { className: styles.resultDetails, children: [jsxRuntimeExports.jsx("p", { className: styles.patientName, children: highlightMatch(`${patient.first_name} ${patient.last_name}`, searchTerm) }), jsxRuntimeExports.jsx("p", { className: styles.patientEmail, children: patient.email &&
587
+ highlightMatch(patient.email, searchTerm) }), patient.dni && (jsxRuntimeExports.jsxs("p", { className: styles.patientDni, children: [labels.dniLabel, ":", " ", highlightMatch(patient.dni, searchTerm)] }))] }), jsxRuntimeExports.jsx("div", { children: jsxRuntimeExports.jsx("span", { className: classNames(styles.statusBadge, patient.active
588
+ ? styles.statusActive
589
+ : styles.statusInactive), children: patient.active
590
+ ? labels.activeStatus
591
+ : labels.inactiveStatus }) })] }) }, patient.id)))] })) : !loading ? (jsxRuntimeExports.jsxs("div", { className: styles.noResults, children: [jsxRuntimeExports.jsx(Ee, { size: "lg", className: styles.noResultsIcon }), jsxRuntimeExports.jsx("p", { className: styles.noResultsTitle, children: labels.noResultsTitle }), jsxRuntimeExports.jsx("p", { className: styles.noResultsHint, children: labels.noResultsHint })] })) : null, jsxRuntimeExports.jsx("button", { onClick: handleCreateNew, onMouseEnter: () => setHighlightedIndex(results.length), className: classNames(styles.createButton, highlightedIndex === results.length &&
592
+ styles.createButtonHighlighted), children: jsxRuntimeExports.jsxs("div", { className: styles.createContent, children: [jsxRuntimeExports.jsx("div", { className: styles.createIconWrapper, children: jsxRuntimeExports.jsx(Ce, { size: "md", className: styles.createIcon }) }), jsxRuntimeExports.jsxs("div", { children: [jsxRuntimeExports.jsx("p", { className: styles.createTitle, children: labels.createNewPatient }), searchTerm && (jsxRuntimeExports.jsxs("p", { className: styles.createSubtitle, children: [labels.withSearchTerm, ": \"", searchTerm, "\""] }))] })] }) })] }))] }));
593
+ };
594
+
595
+ module.exports = PatientSearch;