import { t as B } from "./index.esm-0G7eAEV5.js";
import { t as _sfc_main$1 } from "./ActionMessage-DRAWBZho.js";
import { t as _sfc_main$2 } from "./SecondaryButton-ub85RH3e.js";
import { A as _sfc_main$9, M as _sfc_main$6, S as _sfc_main$4, T as _sfc_main$7, Z as $extras, dt as _sfc_main$3, f as _sfc_main$8, vt as _sfc_main$10, w as _sfc_main$5 } from "../ssr.js";
import { t as _sfc_main$11 } from "./AdminLayout-eZgRfDMK.js";
import { n as _sfc_main$12 } from "./Form-BuxG2AwZ.js";
import _sfc_main$13 from "./Form-DNnL-FQg2.js";
import _sfc_main$14 from "./Form-BrQwMjsX.js";
import { router, useForm } from "@inertiajs/vue3";
import { Fragment, createBlock, createCommentVNode, createTextVNode, createVNode, openBlock, ref, renderList, resolveComponent, toDisplayString, unref, useSSRContext, vModelCheckbox, withCtx, withDirectives } from "vue";
import { useI18n } from "vue-i18n";
import { ssrIncludeBooleanAttr, ssrInterpolate, ssrLooseContain, ssrRenderAttr, ssrRenderComponent, ssrRenderList } from "vue/server-renderer";
import dayjs from "dayjs";
//#region resources/js/Pages/Sma/Repair/RepairOrder/Form.vue
var _sfc_main = /* @__PURE__ */ Object.assign({ layout: _sfc_main$11 }, {
	__name: "Form",
	__ssrInlineRender: true,
	props: {
		current: Object,
		serviceTypes: Array,
		technicians: Array,
		custom_fields: Array,
		customer_fields: Array,
		countries: Array,
		taxes: Array
	},
	setup(__props) {
		const { t } = useI18n();
		const props = __props;
		const form = useForm({
			_method: props.current?.id ? "PUT" : "POST",
			customer_id: props.current?.customer_id || null,
			service_type_id: props.current?.service_type_id || null,
			store_id: props.current?.store_id || null,
			technician_id: props.current?.technician_id || null,
			reference: props.current?.reference || "",
			serial_no: props.current?.serial_no || "",
			device_password: props.current?.device_password || "",
			device_pattern: props.current?.device_pattern || "",
			device_condition: props.current?.device_condition || "fair",
			problem_description: props.current?.problem_description || "",
			technician_comment: props.current?.technician_comment || "",
			internal_notes: props.current?.internal_notes || "",
			customer_notes: props.current?.customer_notes || "",
			price: props.current?.price ? Number(props.current?.price) : "",
			actual_cost: props.current?.actual_cost ? Number(props.current?.actual_cost) : "",
			tax_amount: props.current?.tax_amount ? Number(props.current?.tax_amount) : 0,
			tax_included: props.current?.tax_included || false,
			taxes: props.current?.taxes?.map((t) => t.id) || [],
			received_date: props.current?.received_date ? dayjs(props.current.received_date).format("YYYY-MM-DD") : dayjs().format("YYYY-MM-DD"),
			due_date: props.current?.due_date ? dayjs(props.current.due_date).format("YYYY-MM-DD") : "",
			completed_date: props.current?.completed_date ? dayjs(props.current.completed_date).format("YYYY-MM-DD") : "",
			status: props.current?.status || "pending",
			priority: props.current?.priority || "normal",
			extra_attributes: props.current ? $extras(props.custom_fields, props.current.extra_attributes) : $extras(props.custom_fields),
			attachments: []
		});
		const fileInput = ref(null);
		const uploadedFiles = ref([]);
		const add_customer = ref(false);
		const add_technician = ref(false);
		const add_service_type = ref(false);
		const conditionOptions = [
			{
				value: "excellent",
				label: t("Excellent")
			},
			{
				value: "good",
				label: t("Good")
			},
			{
				value: "fair",
				label: t("Fair")
			},
			{
				value: "poor",
				label: t("Poor")
			}
		];
		const statusOptions = [
			{
				value: "pending",
				label: t("Pending")
			},
			{
				value: "in_progress",
				label: t("In Progress")
			},
			{
				value: "waiting_parts",
				label: t("Waiting Parts")
			},
			{
				value: "completed",
				label: t("Completed")
			},
			{
				value: "delivered",
				label: t("Delivered")
			},
			{
				value: "cancelled",
				label: t("Cancelled")
			}
		];
		const priorityOptions = [
			{
				value: "low",
				label: t("Low")
			},
			{
				value: "normal",
				label: t("Normal")
			},
			{
				value: "high",
				label: t("High")
			},
			{
				value: "urgent",
				label: t("Urgent")
			}
		];
		function handleFileChange(event) {
			const files = Array.from(event.target.files);
			uploadedFiles.value = [...uploadedFiles.value, ...files];
			form.attachments = uploadedFiles.value;
		}
		function removeFile(index) {
			uploadedFiles.value.splice(index, 1);
			form.attachments = uploadedFiles.value;
			if (fileInput.value) fileInput.value.value = "";
		}
		function removeExistingAttachment(attachmentId) {
			if (confirm("Are you sure you want to delete this attachment?")) router.delete(B("repair-orders.attachments.destroy", {
				repair_order: props.current.id,
				attachment: attachmentId
			}), { preserveScroll: true });
		}
		function formatFileSize(bytes) {
			if (!bytes) return "0 B";
			const k = 1024;
			const sizes = [
				"B",
				"KB",
				"MB",
				"GB"
			];
			const i = Math.floor(Math.log(bytes) / Math.log(k));
			return Math.round(bytes / Math.pow(k, i) * 100) / 100 + " " + sizes[i];
		}
		function handleSubmit(event, redirectToList = false) {
			form.errors = {};
			form.transform((data) => {
				const formData = { ...data };
				formData.received_date = formData.received_date ? dayjs(formData.received_date).format("YYYY-MM-DD") : null;
				formData.due_date = formData.due_date ? dayjs(formData.due_date).format("YYYY-MM-DD") : null;
				formData.completed_date = formData.completed_date ? dayjs(formData.completed_date).format("YYYY-MM-DD") : null;
				return formData;
			}).post(props.current?.id ? B("repair-orders.update", props.current.id) : B("repair-orders.store"), {
				forceFormData: true,
				onSuccess: () => {
					if (redirectToList) router.get(B("repair-orders.index"));
					else {
						uploadedFiles.value = [];
						if (fileInput.value) fileInput.value.value = "";
					}
				}
			});
		}
		return (_ctx, _push, _parent, _attrs) => {
			const _component_Head = resolveComponent("Head");
			const _component_Link = resolveComponent("Link");
			const _component_Icon = resolveComponent("Icon");
			_push(`<!--[-->`);
			_push(ssrRenderComponent(_component_Head, null, {
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) _push(`<title${_scopeId}>${ssrInterpolate(__props.current?.id ? _ctx.$t("Edit {x}", { x: _ctx.$t("Repair Order") }) : _ctx.$t("Add {x}", { x: _ctx.$t("Repair Order") }))}</title>`);
					else return [createVNode("title", null, toDisplayString(__props.current?.id ? _ctx.$t("Edit {x}", { x: _ctx.$t("Repair Order") }) : _ctx.$t("Add {x}", { x: _ctx.$t("Repair Order") })), 1)];
				}),
				_: 1
			}, _parent));
			_push(`<div class="px-0 pt-6 pb-0 sm:px-6 sm:py-8 lg:px-8">`);
			_push(ssrRenderComponent(unref(_sfc_main$3), { onSubmitted: (e) => handleSubmit(e, false) }, {
				title: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) _push(`${ssrInterpolate(__props.current?.id ? _ctx.$t("Edit {x}", { x: _ctx.$t("Repair Order") }) : _ctx.$t("Add {x}", { x: _ctx.$t("Repair Order") }))}`);
					else return [createTextVNode(toDisplayString(__props.current?.id ? _ctx.$t("Edit {x}", { x: _ctx.$t("Repair Order") }) : _ctx.$t("Add {x}", { x: _ctx.$t("Repair Order") })), 1)];
				}),
				description: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) {
						_push(`<div class="block w-full sm:flex sm:items-start sm:justify-between lg:block"${_scopeId}><div${_scopeId}>${ssrInterpolate(_ctx.$t("Please fill the form below to {action} {record}.", {
							record: _ctx.$t("repair order"),
							action: __props.current?.id ? _ctx.$t("edit") : _ctx.$t("add")
						}))}</div><div class="me-3 mt-6 sm:mt-0 lg:mt-6"${_scopeId}>`);
						_push(ssrRenderComponent(_component_Link, {
							class: "link",
							href: unref(B)("repair-orders.index")
						}, {
							default: withCtx((_, _push, _parent, _scopeId) => {
								if (_push) _push(`${ssrInterpolate(_ctx.$t("List {x}", { x: _ctx.$t("Repair Orders") }))}`);
								else return [createTextVNode(toDisplayString(_ctx.$t("List {x}", { x: _ctx.$t("Repair Orders") })), 1)];
							}),
							_: 1
						}, _parent, _scopeId));
						_push(`</div></div>`);
					} else return [createVNode("div", { class: "block w-full sm:flex sm:items-start sm:justify-between lg:block" }, [createVNode("div", null, toDisplayString(_ctx.$t("Please fill the form below to {action} {record}.", {
						record: _ctx.$t("repair order"),
						action: __props.current?.id ? _ctx.$t("edit") : _ctx.$t("add")
					})), 1), createVNode("div", { class: "me-3 mt-6 sm:mt-0 lg:mt-6" }, [createVNode(_component_Link, {
						class: "link",
						href: unref(B)("repair-orders.index")
					}, {
						default: withCtx(() => [createTextVNode(toDisplayString(_ctx.$t("List {x}", { x: _ctx.$t("Repair Orders") })), 1)]),
						_: 1
					}, 8, ["href"])])])];
				}),
				form: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) {
						_push(`<div class="col-span-6 sm:col-span-3"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$4), {
							id: "reference",
							label: _ctx.$t("Reference"),
							modelValue: unref(form).reference,
							"onUpdate:modelValue": ($event) => unref(form).reference = $event,
							error: unref(form).errors.reference,
							placeholder: _ctx.$t("Auto-generated if empty")
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-6 sm:col-span-3"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$5), {
							type: "date",
							id: "received_date",
							label: _ctx.$t("Received Date"),
							modelValue: unref(form).received_date,
							"onUpdate:modelValue": ($event) => unref(form).received_date = $event,
							error: unref(form).errors.received_date
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-6 sm:col-span-3"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$6), {
							json: true,
							valueKey: "id",
							id: "customer_id",
							labelKey: "company",
							searchable: true,
							label: _ctx.$t("Customer"),
							modelValue: unref(form).customer_id,
							"onUpdate:modelValue": ($event) => unref(form).customer_id = $event,
							action: () => add_customer.value = true,
							error: _ctx.$page.props.errors.customer_id,
							suggestions: unref(B)("search.customers"),
							"action-text": _ctx.$t("Add {x}", { x: _ctx.$t("Customer") })
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-6 sm:col-span-3"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$6), {
							json: true,
							searchable: true,
							id: "service_type_id",
							label: _ctx.$t("Service Type"),
							modelValue: unref(form).service_type_id,
							"onUpdate:modelValue": ($event) => unref(form).service_type_id = $event,
							error: unref(form).errors.service_type_id,
							placeholder: _ctx.$t("Select Service Type"),
							action: () => add_service_type.value = true,
							"action-text": _ctx.$t("Add {x}", { x: _ctx.$t("Service Type") }),
							suggestions: __props.serviceTypes.map((st) => ({
								value: st.id,
								label: st.name
							}))
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-6 sm:col-span-3"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$4), {
							id: "serial_no",
							modelValue: unref(form).serial_no,
							"onUpdate:modelValue": ($event) => unref(form).serial_no = $event,
							label: _ctx.$t("Serial Number"),
							error: unref(form).errors.serial_no,
							placeholder: _ctx.$t("Device serial number or IMEI")
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-6 sm:col-span-3"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$6), {
							json: true,
							id: "device_condition",
							label: _ctx.$t("Device Condition"),
							modelValue: unref(form).device_condition,
							"onUpdate:modelValue": ($event) => unref(form).device_condition = $event,
							suggestions: conditionOptions,
							error: unref(form).errors.device_condition
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-6 sm:col-span-3"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$4), {
							id: "device_password",
							type: "text",
							modelValue: unref(form).device_password,
							"onUpdate:modelValue": ($event) => unref(form).device_password = $event,
							label: _ctx.$t("Device Password/PIN"),
							error: unref(form).errors.device_password,
							placeholder: _ctx.$t("For phone/tablet unlock")
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-full flex flex-col gap-6"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$7), {
							errors: unref(form).errors,
							custom_fields: __props.custom_fields,
							extra_attributes: unref(form).extra_attributes
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-6"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$8), {
							rows: "3",
							id: "problem_description",
							label: _ctx.$t("Problem Description"),
							modelValue: unref(form).problem_description,
							"onUpdate:modelValue": ($event) => unref(form).problem_description = $event,
							error: unref(form).errors.problem_description,
							placeholder: _ctx.$t("Describe the issue reported by customer")
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-6 sm:col-span-3"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$6), {
							json: true,
							id: "technician_id",
							searchable: true,
							modelValue: unref(form).technician_id,
							"onUpdate:modelValue": ($event) => unref(form).technician_id = $event,
							error: unref(form).errors.technician_id,
							label: _ctx.$t("Assign to Technician"),
							placeholder: _ctx.$t("Select Technician"),
							action: () => add_technician.value = true,
							"action-text": _ctx.$t("Add {x}", { x: _ctx.$t("Technician") }),
							suggestions: __props.technicians.map((t) => ({
								value: t.id,
								label: t.name
							}))
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-6 sm:col-span-2"${_scopeId}></div><div class="col-span-6 sm:col-span-2"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$6), {
							json: true,
							id: "status",
							label: _ctx.$t("Status"),
							modelValue: unref(form).status,
							"onUpdate:modelValue": ($event) => unref(form).status = $event,
							error: unref(form).errors.status,
							suggestions: statusOptions
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-6 sm:col-span-2"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$6), {
							json: true,
							id: "priority",
							label: _ctx.$t("Priority"),
							modelValue: unref(form).priority,
							"onUpdate:modelValue": ($event) => unref(form).priority = $event,
							error: unref(form).errors.priority,
							suggestions: priorityOptions
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-6 sm:col-span-2"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$5), {
							type: "date",
							id: "due_date",
							label: _ctx.$t("Due Date"),
							modelValue: unref(form).due_date,
							"onUpdate:modelValue": ($event) => unref(form).due_date = $event,
							error: unref(form).errors.due_date
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-6 sm:col-span-3"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$4), {
							type: "number",
							step: "0.01",
							min: "0",
							id: "price",
							label: _ctx.$t("Price"),
							modelValue: unref(form).price,
							"onUpdate:modelValue": ($event) => unref(form).price = $event,
							error: unref(form).errors.price
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-6 sm:col-span-3"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$4), {
							type: "number",
							step: "0.01",
							min: "0",
							id: "actual_cost",
							label: _ctx.$t("Actual Cost"),
							modelValue: unref(form).actual_cost,
							"onUpdate:modelValue": ($event) => unref(form).actual_cost = $event,
							error: unref(form).errors.actual_cost
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-6 sm:col-span-3"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$6), {
							json: true,
							multiple: true,
							searchable: true,
							id: "taxes",
							label: _ctx.$t("Taxes"),
							modelValue: unref(form).taxes,
							"onUpdate:modelValue": ($event) => unref(form).taxes = $event,
							error: unref(form).errors.taxes,
							placeholder: _ctx.$t("Select Taxes"),
							suggestions: __props.taxes.map((t) => ({
								value: t.id,
								label: `${t.name} (${t.rate}%)`
							}))
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-6 sm:col-span-4"${_scopeId}><div class="flex items-center"${_scopeId}><input id="tax_included" type="checkbox"${ssrIncludeBooleanAttr(Array.isArray(unref(form).tax_included) ? ssrLooseContain(unref(form).tax_included, null) : unref(form).tax_included) ? " checked" : ""} class="h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:ring-offset-gray-800"${_scopeId}><label for="tax_included" class="ml-2 block text-sm font-medium text-gray-700 dark:text-gray-300"${_scopeId}>${ssrInterpolate(_ctx.$t("Tax Included in Price"))}</label></div><p class="mt-1 text-xs text-gray-500"${_scopeId}>${ssrInterpolate(_ctx.$t("Check if the price/actual cost already includes taxes"))}</p>`);
						if (unref(form).errors.tax_included) _push(`<div class="mt-2 text-sm text-red-600"${_scopeId}>${ssrInterpolate(unref(form).errors.tax_included)}</div>`);
						else _push(`<!---->`);
						_push(`</div>`);
						if (["completed", "delivered"].includes(unref(form).status)) {
							_push(`<div class="col-span-6 sm:col-span-3"${_scopeId}>`);
							_push(ssrRenderComponent(unref(_sfc_main$5), {
								type: "date",
								id: "completed_date",
								label: _ctx.$t("Completed Date"),
								modelValue: unref(form).completed_date,
								"onUpdate:modelValue": ($event) => unref(form).completed_date = $event,
								error: unref(form).errors.completed_date
							}, null, _parent, _scopeId));
							_push(`</div>`);
						} else _push(`<!---->`);
						_push(`<div class="col-span-6"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$8), {
							rows: "2",
							id: "technician_comment",
							label: _ctx.$t("Technician Comment"),
							modelValue: unref(form).technician_comment,
							"onUpdate:modelValue": ($event) => unref(form).technician_comment = $event,
							error: unref(form).errors.technician_comment,
							placeholder: _ctx.$t("Notes from the technician")
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-6 sm:col-span-6"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$8), {
							rows: "2",
							id: "internal_notes",
							label: _ctx.$t("Internal Notes"),
							modelValue: unref(form).internal_notes,
							"onUpdate:modelValue": ($event) => unref(form).internal_notes = $event,
							error: unref(form).errors.internal_notes,
							placeholder: _ctx.$t("Internal notes (not visible to customer)")
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-6 sm:col-span-6"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$8), {
							rows: "2",
							id: "customer_notes",
							label: _ctx.$t("Customer Notes"),
							modelValue: unref(form).customer_notes,
							"onUpdate:modelValue": ($event) => unref(form).customer_notes = $event,
							error: unref(form).errors.customer_notes,
							placeholder: _ctx.$t("Notes visible to customer on status page")
						}, null, _parent, _scopeId));
						_push(`</div><div class="col-span-6"${_scopeId}><label class="block text-sm font-medium text-gray-700 dark:text-gray-300"${_scopeId}>${ssrInterpolate(_ctx.$t("Attachments"))}</label><div class="mt-1"${_scopeId}><input multiple type="file" accept="image/*,application/pdf" class="block w-full rounded-md border border-gray-300 text-sm text-gray-500 file:-mx-1 file:mr-4 file:rounded-l-md file:border-0 file:bg-blue-50 file:px-4 file:py-2 file:text-sm file:font-semibold file:text-blue-700 hover:file:bg-blue-100 focus:border-primary-500 focus:outline-primary-500 dark:border-gray-700 dark:file:bg-blue-900 dark:file:text-blue-300 dark:hover:file:bg-blue-800"${_scopeId}><p class="mt-1 text-xs text-gray-500"${_scopeId}>${ssrInterpolate(_ctx.$t("Max 2MB per file. Images and PDF only."))}</p></div>`);
						if (uploadedFiles.value.length > 0) {
							_push(`<div class="mt-4"${_scopeId}><h4 class="mb-2 text-sm font-medium text-gray-700 dark:text-gray-300"${_scopeId}>${ssrInterpolate(_ctx.$t("New Attachments"))}</h4><ul class="divide-y divide-gray-200 rounded-md border border-gray-200 dark:divide-gray-700 dark:border-gray-700"${_scopeId}><!--[-->`);
							ssrRenderList(uploadedFiles.value, (file, index) => {
								_push(`<li class="flex items-center justify-between py-2 pr-4 pl-3 text-sm"${_scopeId}><div class="flex w-0 flex-1 items-center"${_scopeId}>`);
								_push(ssrRenderComponent(_component_Icon, {
									name: "paperclip",
									class: "size-5 flex-shrink-0 text-gray-400"
								}, null, _parent, _scopeId));
								_push(`<span class="ml-2 w-0 flex-1 truncate"${_scopeId}>${ssrInterpolate(file.name)}</span><span class="ml-2 shrink-0 text-gray-400"${_scopeId}>${ssrInterpolate(formatFileSize(file.size))}</span></div><div class="ml-4 shrink-0"${_scopeId}><button type="button" class="font-medium text-red-600 hover:text-red-500"${_scopeId}>${ssrInterpolate(_ctx.$t("Remove"))}</button></div></li>`);
							});
							_push(`<!--]--></ul></div>`);
						} else _push(`<!---->`);
						if (__props.current?.attachments && __props.current.attachments.length > 0) {
							_push(`<div class="mt-4"${_scopeId}><h4 class="mb-2 text-sm font-medium text-gray-700 dark:text-gray-300"${_scopeId}>${ssrInterpolate(_ctx.$t("Existing Attachments"))}</h4><ul class="divide-y divide-gray-200 rounded-md border border-gray-200 dark:divide-gray-700 dark:border-gray-700"${_scopeId}><!--[-->`);
							ssrRenderList(__props.current.attachments, (attachment) => {
								_push(`<li class="flex items-center justify-between py-2 pr-4 pl-3 text-sm"${_scopeId}><div class="flex w-0 flex-1 items-center"${_scopeId}>`);
								_push(ssrRenderComponent(_component_Icon, {
									name: "paperclip",
									class: "size-5 shrink-0 text-gray-400"
								}, null, _parent, _scopeId));
								_push(`<span class="ml-2 w-0 flex-1 truncate"${_scopeId}>${ssrInterpolate(attachment.original_filename)}</span><span class="ml-2 shrink-0 text-gray-400"${_scopeId}>${ssrInterpolate(formatFileSize(attachment.size))}</span></div><div class="ml-4 flex shrink-0 space-x-2"${_scopeId}><a target="_blank" class="font-medium text-blue-600 hover:text-blue-500"${ssrRenderAttr("href", unref(B)("repair-order-attachments.download", { attachment: attachment.id }))}${_scopeId}>${ssrInterpolate(_ctx.$t("Download"))}</a><button type="button" class="font-medium text-red-600 hover:text-red-500"${_scopeId}>${ssrInterpolate(_ctx.$t("Delete"))}</button></div></li>`);
							});
							_push(`<!--]--></ul></div>`);
						} else _push(`<!---->`);
						if (unref(form).errors.attachments) _push(`<div class="mt-2 text-sm text-red-600"${_scopeId}>${ssrInterpolate(unref(form).errors.attachments)}</div>`);
						else _push(`<!---->`);
						_push(`</div>`);
					} else return [
						createVNode("div", { class: "col-span-6 sm:col-span-3" }, [createVNode(unref(_sfc_main$4), {
							id: "reference",
							label: _ctx.$t("Reference"),
							modelValue: unref(form).reference,
							"onUpdate:modelValue": ($event) => unref(form).reference = $event,
							error: unref(form).errors.reference,
							placeholder: _ctx.$t("Auto-generated if empty")
						}, null, 8, [
							"label",
							"modelValue",
							"onUpdate:modelValue",
							"error",
							"placeholder"
						])]),
						createVNode("div", { class: "col-span-6 sm:col-span-3" }, [createVNode(unref(_sfc_main$5), {
							type: "date",
							id: "received_date",
							label: _ctx.$t("Received Date"),
							modelValue: unref(form).received_date,
							"onUpdate:modelValue": ($event) => unref(form).received_date = $event,
							error: unref(form).errors.received_date
						}, null, 8, [
							"label",
							"modelValue",
							"onUpdate:modelValue",
							"error"
						])]),
						createVNode("div", { class: "col-span-6 sm:col-span-3" }, [createVNode(unref(_sfc_main$6), {
							json: true,
							valueKey: "id",
							id: "customer_id",
							labelKey: "company",
							searchable: true,
							label: _ctx.$t("Customer"),
							modelValue: unref(form).customer_id,
							"onUpdate:modelValue": ($event) => unref(form).customer_id = $event,
							action: () => add_customer.value = true,
							error: _ctx.$page.props.errors.customer_id,
							suggestions: unref(B)("search.customers"),
							"action-text": _ctx.$t("Add {x}", { x: _ctx.$t("Customer") })
						}, null, 8, [
							"label",
							"modelValue",
							"onUpdate:modelValue",
							"action",
							"error",
							"suggestions",
							"action-text"
						])]),
						createVNode("div", { class: "col-span-6 sm:col-span-3" }, [createVNode(unref(_sfc_main$6), {
							json: true,
							searchable: true,
							id: "service_type_id",
							label: _ctx.$t("Service Type"),
							modelValue: unref(form).service_type_id,
							"onUpdate:modelValue": ($event) => unref(form).service_type_id = $event,
							error: unref(form).errors.service_type_id,
							placeholder: _ctx.$t("Select Service Type"),
							action: () => add_service_type.value = true,
							"action-text": _ctx.$t("Add {x}", { x: _ctx.$t("Service Type") }),
							suggestions: __props.serviceTypes.map((st) => ({
								value: st.id,
								label: st.name
							}))
						}, null, 8, [
							"label",
							"modelValue",
							"onUpdate:modelValue",
							"error",
							"placeholder",
							"action",
							"action-text",
							"suggestions"
						])]),
						createVNode("div", { class: "col-span-6 sm:col-span-3" }, [createVNode(unref(_sfc_main$4), {
							id: "serial_no",
							modelValue: unref(form).serial_no,
							"onUpdate:modelValue": ($event) => unref(form).serial_no = $event,
							label: _ctx.$t("Serial Number"),
							error: unref(form).errors.serial_no,
							placeholder: _ctx.$t("Device serial number or IMEI")
						}, null, 8, [
							"modelValue",
							"onUpdate:modelValue",
							"label",
							"error",
							"placeholder"
						])]),
						createVNode("div", { class: "col-span-6 sm:col-span-3" }, [createVNode(unref(_sfc_main$6), {
							json: true,
							id: "device_condition",
							label: _ctx.$t("Device Condition"),
							modelValue: unref(form).device_condition,
							"onUpdate:modelValue": ($event) => unref(form).device_condition = $event,
							suggestions: conditionOptions,
							error: unref(form).errors.device_condition
						}, null, 8, [
							"label",
							"modelValue",
							"onUpdate:modelValue",
							"error"
						])]),
						createVNode("div", { class: "col-span-6 sm:col-span-3" }, [createVNode(unref(_sfc_main$4), {
							id: "device_password",
							type: "text",
							modelValue: unref(form).device_password,
							"onUpdate:modelValue": ($event) => unref(form).device_password = $event,
							label: _ctx.$t("Device Password/PIN"),
							error: unref(form).errors.device_password,
							placeholder: _ctx.$t("For phone/tablet unlock")
						}, null, 8, [
							"modelValue",
							"onUpdate:modelValue",
							"label",
							"error",
							"placeholder"
						])]),
						createVNode("div", { class: "col-span-full flex flex-col gap-6" }, [createVNode(unref(_sfc_main$7), {
							errors: unref(form).errors,
							custom_fields: __props.custom_fields,
							extra_attributes: unref(form).extra_attributes
						}, null, 8, [
							"errors",
							"custom_fields",
							"extra_attributes"
						])]),
						createVNode("div", { class: "col-span-6" }, [createVNode(unref(_sfc_main$8), {
							rows: "3",
							id: "problem_description",
							label: _ctx.$t("Problem Description"),
							modelValue: unref(form).problem_description,
							"onUpdate:modelValue": ($event) => unref(form).problem_description = $event,
							error: unref(form).errors.problem_description,
							placeholder: _ctx.$t("Describe the issue reported by customer")
						}, null, 8, [
							"label",
							"modelValue",
							"onUpdate:modelValue",
							"error",
							"placeholder"
						])]),
						createVNode("div", { class: "col-span-6 sm:col-span-3" }, [createVNode(unref(_sfc_main$6), {
							json: true,
							id: "technician_id",
							searchable: true,
							modelValue: unref(form).technician_id,
							"onUpdate:modelValue": ($event) => unref(form).technician_id = $event,
							error: unref(form).errors.technician_id,
							label: _ctx.$t("Assign to Technician"),
							placeholder: _ctx.$t("Select Technician"),
							action: () => add_technician.value = true,
							"action-text": _ctx.$t("Add {x}", { x: _ctx.$t("Technician") }),
							suggestions: __props.technicians.map((t) => ({
								value: t.id,
								label: t.name
							}))
						}, null, 8, [
							"modelValue",
							"onUpdate:modelValue",
							"error",
							"label",
							"placeholder",
							"action",
							"action-text",
							"suggestions"
						])]),
						createVNode("div", { class: "col-span-6 sm:col-span-2" }),
						createVNode("div", { class: "col-span-6 sm:col-span-2" }, [createVNode(unref(_sfc_main$6), {
							json: true,
							id: "status",
							label: _ctx.$t("Status"),
							modelValue: unref(form).status,
							"onUpdate:modelValue": ($event) => unref(form).status = $event,
							error: unref(form).errors.status,
							suggestions: statusOptions
						}, null, 8, [
							"label",
							"modelValue",
							"onUpdate:modelValue",
							"error"
						])]),
						createVNode("div", { class: "col-span-6 sm:col-span-2" }, [createVNode(unref(_sfc_main$6), {
							json: true,
							id: "priority",
							label: _ctx.$t("Priority"),
							modelValue: unref(form).priority,
							"onUpdate:modelValue": ($event) => unref(form).priority = $event,
							error: unref(form).errors.priority,
							suggestions: priorityOptions
						}, null, 8, [
							"label",
							"modelValue",
							"onUpdate:modelValue",
							"error"
						])]),
						createVNode("div", { class: "col-span-6 sm:col-span-2" }, [createVNode(unref(_sfc_main$5), {
							type: "date",
							id: "due_date",
							label: _ctx.$t("Due Date"),
							modelValue: unref(form).due_date,
							"onUpdate:modelValue": ($event) => unref(form).due_date = $event,
							error: unref(form).errors.due_date
						}, null, 8, [
							"label",
							"modelValue",
							"onUpdate:modelValue",
							"error"
						])]),
						createVNode("div", { class: "col-span-6 sm:col-span-3" }, [createVNode(unref(_sfc_main$4), {
							type: "number",
							step: "0.01",
							min: "0",
							id: "price",
							label: _ctx.$t("Price"),
							modelValue: unref(form).price,
							"onUpdate:modelValue": ($event) => unref(form).price = $event,
							error: unref(form).errors.price
						}, null, 8, [
							"label",
							"modelValue",
							"onUpdate:modelValue",
							"error"
						])]),
						createVNode("div", { class: "col-span-6 sm:col-span-3" }, [createVNode(unref(_sfc_main$4), {
							type: "number",
							step: "0.01",
							min: "0",
							id: "actual_cost",
							label: _ctx.$t("Actual Cost"),
							modelValue: unref(form).actual_cost,
							"onUpdate:modelValue": ($event) => unref(form).actual_cost = $event,
							error: unref(form).errors.actual_cost
						}, null, 8, [
							"label",
							"modelValue",
							"onUpdate:modelValue",
							"error"
						])]),
						createVNode("div", { class: "col-span-6 sm:col-span-3" }, [createVNode(unref(_sfc_main$6), {
							json: true,
							multiple: true,
							searchable: true,
							id: "taxes",
							label: _ctx.$t("Taxes"),
							modelValue: unref(form).taxes,
							"onUpdate:modelValue": ($event) => unref(form).taxes = $event,
							error: unref(form).errors.taxes,
							placeholder: _ctx.$t("Select Taxes"),
							suggestions: __props.taxes.map((t) => ({
								value: t.id,
								label: `${t.name} (${t.rate}%)`
							}))
						}, null, 8, [
							"label",
							"modelValue",
							"onUpdate:modelValue",
							"error",
							"placeholder",
							"suggestions"
						])]),
						createVNode("div", { class: "col-span-6 sm:col-span-4" }, [
							createVNode("div", { class: "flex items-center" }, [withDirectives(createVNode("input", {
								id: "tax_included",
								type: "checkbox",
								"onUpdate:modelValue": ($event) => unref(form).tax_included = $event,
								class: "h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:ring-offset-gray-800"
							}, null, 8, ["onUpdate:modelValue"]), [[vModelCheckbox, unref(form).tax_included]]), createVNode("label", {
								for: "tax_included",
								class: "ml-2 block text-sm font-medium text-gray-700 dark:text-gray-300"
							}, toDisplayString(_ctx.$t("Tax Included in Price")), 1)]),
							createVNode("p", { class: "mt-1 text-xs text-gray-500" }, toDisplayString(_ctx.$t("Check if the price/actual cost already includes taxes")), 1),
							unref(form).errors.tax_included ? (openBlock(), createBlock("div", {
								key: 0,
								class: "mt-2 text-sm text-red-600"
							}, toDisplayString(unref(form).errors.tax_included), 1)) : createCommentVNode("", true)
						]),
						["completed", "delivered"].includes(unref(form).status) ? (openBlock(), createBlock("div", {
							key: 0,
							class: "col-span-6 sm:col-span-3"
						}, [createVNode(unref(_sfc_main$5), {
							type: "date",
							id: "completed_date",
							label: _ctx.$t("Completed Date"),
							modelValue: unref(form).completed_date,
							"onUpdate:modelValue": ($event) => unref(form).completed_date = $event,
							error: unref(form).errors.completed_date
						}, null, 8, [
							"label",
							"modelValue",
							"onUpdate:modelValue",
							"error"
						])])) : createCommentVNode("", true),
						createVNode("div", { class: "col-span-6" }, [createVNode(unref(_sfc_main$8), {
							rows: "2",
							id: "technician_comment",
							label: _ctx.$t("Technician Comment"),
							modelValue: unref(form).technician_comment,
							"onUpdate:modelValue": ($event) => unref(form).technician_comment = $event,
							error: unref(form).errors.technician_comment,
							placeholder: _ctx.$t("Notes from the technician")
						}, null, 8, [
							"label",
							"modelValue",
							"onUpdate:modelValue",
							"error",
							"placeholder"
						])]),
						createVNode("div", { class: "col-span-6 sm:col-span-6" }, [createVNode(unref(_sfc_main$8), {
							rows: "2",
							id: "internal_notes",
							label: _ctx.$t("Internal Notes"),
							modelValue: unref(form).internal_notes,
							"onUpdate:modelValue": ($event) => unref(form).internal_notes = $event,
							error: unref(form).errors.internal_notes,
							placeholder: _ctx.$t("Internal notes (not visible to customer)")
						}, null, 8, [
							"label",
							"modelValue",
							"onUpdate:modelValue",
							"error",
							"placeholder"
						])]),
						createVNode("div", { class: "col-span-6 sm:col-span-6" }, [createVNode(unref(_sfc_main$8), {
							rows: "2",
							id: "customer_notes",
							label: _ctx.$t("Customer Notes"),
							modelValue: unref(form).customer_notes,
							"onUpdate:modelValue": ($event) => unref(form).customer_notes = $event,
							error: unref(form).errors.customer_notes,
							placeholder: _ctx.$t("Notes visible to customer on status page")
						}, null, 8, [
							"label",
							"modelValue",
							"onUpdate:modelValue",
							"error",
							"placeholder"
						])]),
						createVNode("div", { class: "col-span-6" }, [
							createVNode("label", { class: "block text-sm font-medium text-gray-700 dark:text-gray-300" }, toDisplayString(_ctx.$t("Attachments")), 1),
							createVNode("div", { class: "mt-1" }, [createVNode("input", {
								multiple: "",
								type: "file",
								ref_key: "fileInput",
								ref: fileInput,
								onChange: handleFileChange,
								accept: "image/*,application/pdf",
								class: "block w-full rounded-md border border-gray-300 text-sm text-gray-500 file:-mx-1 file:mr-4 file:rounded-l-md file:border-0 file:bg-blue-50 file:px-4 file:py-2 file:text-sm file:font-semibold file:text-blue-700 hover:file:bg-blue-100 focus:border-primary-500 focus:outline-primary-500 dark:border-gray-700 dark:file:bg-blue-900 dark:file:text-blue-300 dark:hover:file:bg-blue-800"
							}, null, 544), createVNode("p", { class: "mt-1 text-xs text-gray-500" }, toDisplayString(_ctx.$t("Max 2MB per file. Images and PDF only.")), 1)]),
							uploadedFiles.value.length > 0 ? (openBlock(), createBlock("div", {
								key: 0,
								class: "mt-4"
							}, [createVNode("h4", { class: "mb-2 text-sm font-medium text-gray-700 dark:text-gray-300" }, toDisplayString(_ctx.$t("New Attachments")), 1), createVNode("ul", { class: "divide-y divide-gray-200 rounded-md border border-gray-200 dark:divide-gray-700 dark:border-gray-700" }, [(openBlock(true), createBlock(Fragment, null, renderList(uploadedFiles.value, (file, index) => {
								return openBlock(), createBlock("li", {
									key: index,
									class: "flex items-center justify-between py-2 pr-4 pl-3 text-sm"
								}, [createVNode("div", { class: "flex w-0 flex-1 items-center" }, [
									createVNode(_component_Icon, {
										name: "paperclip",
										class: "size-5 flex-shrink-0 text-gray-400"
									}),
									createVNode("span", { class: "ml-2 w-0 flex-1 truncate" }, toDisplayString(file.name), 1),
									createVNode("span", { class: "ml-2 shrink-0 text-gray-400" }, toDisplayString(formatFileSize(file.size)), 1)
								]), createVNode("div", { class: "ml-4 shrink-0" }, [createVNode("button", {
									onClick: ($event) => removeFile(index),
									type: "button",
									class: "font-medium text-red-600 hover:text-red-500"
								}, toDisplayString(_ctx.$t("Remove")), 9, ["onClick"])])]);
							}), 128))])])) : createCommentVNode("", true),
							__props.current?.attachments && __props.current.attachments.length > 0 ? (openBlock(), createBlock("div", {
								key: 1,
								class: "mt-4"
							}, [createVNode("h4", { class: "mb-2 text-sm font-medium text-gray-700 dark:text-gray-300" }, toDisplayString(_ctx.$t("Existing Attachments")), 1), createVNode("ul", { class: "divide-y divide-gray-200 rounded-md border border-gray-200 dark:divide-gray-700 dark:border-gray-700" }, [(openBlock(true), createBlock(Fragment, null, renderList(__props.current.attachments, (attachment) => {
								return openBlock(), createBlock("li", {
									key: attachment.id,
									class: "flex items-center justify-between py-2 pr-4 pl-3 text-sm"
								}, [createVNode("div", { class: "flex w-0 flex-1 items-center" }, [
									createVNode(_component_Icon, {
										name: "paperclip",
										class: "size-5 shrink-0 text-gray-400"
									}),
									createVNode("span", { class: "ml-2 w-0 flex-1 truncate" }, toDisplayString(attachment.original_filename), 1),
									createVNode("span", { class: "ml-2 shrink-0 text-gray-400" }, toDisplayString(formatFileSize(attachment.size)), 1)
								]), createVNode("div", { class: "ml-4 flex shrink-0 space-x-2" }, [createVNode("a", {
									target: "_blank",
									class: "font-medium text-blue-600 hover:text-blue-500",
									href: unref(B)("repair-order-attachments.download", { attachment: attachment.id })
								}, toDisplayString(_ctx.$t("Download")), 9, ["href"]), createVNode("button", {
									onClick: ($event) => removeExistingAttachment(attachment.id),
									type: "button",
									class: "font-medium text-red-600 hover:text-red-500"
								}, toDisplayString(_ctx.$t("Delete")), 9, ["onClick"])])]);
							}), 128))])])) : createCommentVNode("", true),
							unref(form).errors.attachments ? (openBlock(), createBlock("div", {
								key: 2,
								class: "mt-2 text-sm text-red-600"
							}, toDisplayString(unref(form).errors.attachments), 1)) : createCommentVNode("", true)
						])
					];
				}),
				actions: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) {
						_push(`<div class="flex w-full items-center justify-between"${_scopeId}>`);
						_push(ssrRenderComponent(unref(_sfc_main$2), {
							type: "button",
							onClick: _ctx.resetForm,
							class: "me-3"
						}, {
							default: withCtx((_, _push, _parent, _scopeId) => {
								if (_push) _push(`${ssrInterpolate(_ctx.$t("Reset"))}`);
								else return [createTextVNode(toDisplayString(_ctx.$t("Reset")), 1)];
							}),
							_: 1
						}, _parent, _scopeId));
						_push(`<div class="flex items-center justify-end"${_scopeId}>`);
						if (__props.current) _push(`<button type="button" class="btn-secondary"${ssrRenderAttr("loading", unref(form).processing)}${ssrIncludeBooleanAttr(unref(form).processing) ? " disabled" : ""}${_scopeId}>${ssrInterpolate(_ctx.$t("Save & go to listing"))}</button>`);
						else _push(`<!---->`);
						_push(ssrRenderComponent(unref(_sfc_main$1), {
							on: unref(form).recentlySuccessful,
							class: "ms-3 me-3"
						}, {
							default: withCtx((_, _push, _parent, _scopeId) => {
								if (_push) _push(`${ssrInterpolate(_ctx.$t("Saved."))}`);
								else return [createTextVNode(toDisplayString(_ctx.$t("Saved.")), 1)];
							}),
							_: 1
						}, _parent, _scopeId));
						_push(ssrRenderComponent(unref(_sfc_main$9), {
							type: "button",
							onClick: handleSubmit,
							class: { "opacity-25": unref(form).processing },
							loading: unref(form).processing
						}, {
							default: withCtx((_, _push, _parent, _scopeId) => {
								if (_push) _push(`${ssrInterpolate(_ctx.$t("Save"))}`);
								else return [createTextVNode(toDisplayString(_ctx.$t("Save")), 1)];
							}),
							_: 1
						}, _parent, _scopeId));
						_push(`</div></div>`);
					} else return [createVNode("div", { class: "flex w-full items-center justify-between" }, [createVNode(unref(_sfc_main$2), {
						type: "button",
						onClick: _ctx.resetForm,
						class: "me-3"
					}, {
						default: withCtx(() => [createTextVNode(toDisplayString(_ctx.$t("Reset")), 1)]),
						_: 1
					}, 8, ["onClick"]), createVNode("div", { class: "flex items-center justify-end" }, [
						__props.current ? (openBlock(), createBlock("button", {
							key: 0,
							type: "button",
							class: "btn-secondary",
							loading: unref(form).processing,
							disabled: unref(form).processing,
							onClick: (e) => handleSubmit(e, true)
						}, toDisplayString(_ctx.$t("Save & go to listing")), 9, [
							"loading",
							"disabled",
							"onClick"
						])) : createCommentVNode("", true),
						createVNode(unref(_sfc_main$1), {
							on: unref(form).recentlySuccessful,
							class: "ms-3 me-3"
						}, {
							default: withCtx(() => [createTextVNode(toDisplayString(_ctx.$t("Saved.")), 1)]),
							_: 1
						}, 8, ["on"]),
						createVNode(unref(_sfc_main$9), {
							type: "button",
							onClick: handleSubmit,
							class: { "opacity-25": unref(form).processing },
							loading: unref(form).processing
						}, {
							default: withCtx(() => [createTextVNode(toDisplayString(_ctx.$t("Save")), 1)]),
							_: 1
						}, 8, ["class", "loading"])
					])])];
				}),
				_: 1
			}, _parent));
			_push(`</div>`);
			_push(ssrRenderComponent(unref(_sfc_main$10), {
				show: add_service_type.value,
				backdrop: false,
				overflow: true,
				"max-width": "2xl",
				closeable: true,
				onClose: ($event) => add_service_type.value = false
			}, {
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) _push(ssrRenderComponent(_sfc_main$13, {
						onClose: ($event) => add_service_type.value = false,
						onDone: (e) => {
							__props.serviceTypes.push({ ...e });
							unref(form).service_type_id = e?.id;
							add_service_type.value = false;
						}
					}, null, _parent, _scopeId));
					else return [createVNode(_sfc_main$13, {
						onClose: ($event) => add_service_type.value = false,
						onDone: (e) => {
							__props.serviceTypes.push({ ...e });
							unref(form).service_type_id = e?.id;
							add_service_type.value = false;
						}
					}, null, 8, ["onClose", "onDone"])];
				}),
				_: 1
			}, _parent));
			_push(ssrRenderComponent(unref(_sfc_main$10), {
				show: add_technician.value,
				backdrop: false,
				overflow: true,
				"max-width": "2xl",
				closeable: true,
				onClose: ($event) => add_technician.value = false
			}, {
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) _push(ssrRenderComponent(_sfc_main$14, {
						onClose: ($event) => add_technician.value = false,
						onDone: (e) => {
							__props.technicians.push({ ...e });
							unref(form).technician_id = e?.id;
							add_technician.value = false;
						}
					}, null, _parent, _scopeId));
					else return [createVNode(_sfc_main$14, {
						onClose: ($event) => add_technician.value = false,
						onDone: (e) => {
							__props.technicians.push({ ...e });
							unref(form).technician_id = e?.id;
							add_technician.value = false;
						}
					}, null, 8, ["onClose", "onDone"])];
				}),
				_: 1
			}, _parent));
			_push(ssrRenderComponent(unref(_sfc_main$10), {
				show: add_customer.value,
				backdrop: false,
				overflow: true,
				"max-width": "2xl",
				closeable: true,
				onClose: ($event) => add_customer.value = false
			}, {
				default: withCtx((_, _push, _parent, _scopeId) => {
					if (_push) _push(ssrRenderComponent(_sfc_main$12, {
						countries: __props.countries,
						custom_fields: __props.customer_fields,
						onClose: ($event) => add_customer.value = false,
						onDone: (e) => {
							unref(form).customer = { ...e };
							unref(form).customer_id = e?.id;
							add_customer.value = false;
						}
					}, null, _parent, _scopeId));
					else return [createVNode(_sfc_main$12, {
						countries: __props.countries,
						custom_fields: __props.customer_fields,
						onClose: ($event) => add_customer.value = false,
						onDone: (e) => {
							unref(form).customer = { ...e };
							unref(form).customer_id = e?.id;
							add_customer.value = false;
						}
					}, null, 8, [
						"countries",
						"custom_fields",
						"onClose",
						"onDone"
					])];
				}),
				_: 1
			}, _parent));
			_push(`<!--]-->`);
		};
	}
});
var _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
	const ssrContext = useSSRContext();
	(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("resources/js/Pages/Sma/Repair/RepairOrder/Form.vue");
	return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
//#endregion
export { _sfc_main as default };
