1import{d3 as ne,E as de,j as e,ax as ce,d4 as ie,r as a,ez as ue,eA as xe,eB as me,eC as pe,b4 as he,b3 as be,bN as fe,bO as ge,ap as je,ao as ve,bP as ye,bT as Ne,as as C,bf as we,cI as Y,eD as Ae,aI as d,b9 as Z,W as ke,X as Ce,b8 as Se,cf as Te,cg as De,ch as Fe,ci as Pe,cj as i,O as Ee,b5 as Me,z as Ie,v as Oe}from"./index-CpeGhXo5.js";import{NewFixedAssetPage as Ve}from"./finance.fixed-assets.new-DWK1glQ7.js";import{F as S}from"./FinanceKpiCard-CceklJE9.js";import{k as Le,l as Re}from"./financeMappers-CUv1G2pV.js";import{u as Ue}from"./useCurrencyHelpers-D5hUvgaW.js";import{F as He,f as $e}from"./FinanceFormField-BQlXTOvW.js";import{F as qe}from"./FilterBar-B_jdgGzl.js";import{T as Be}from"./EntityPill-btGCy98_.js";import{S as ze}from"./square-pen-TpnbuZyJ.js";import"./Panel-Cf_wAUzv.js";import"./currency-CACMzR5Q.js";import"./filters-DQMtevU2.js";import"./mock-Ci00pIzy.js";function Ke({options:N,value:T,onChange:g,onAdd:j,onEdit:v,onDelete:h,placeholder:c}){const[u,s]=a.useState(!1),[w,x]=a.useState(""),[m,p]=a.useState(""),[l,b]=a.useState(null),[f,A]=a.useState(""),k=N.filter(o=>o.toLowerCase().includes(w.toLowerCase()));return e.jsxs("div",{className:"relative w-full",children:[e.jsxs("button",{type:"button",onClick:()=>s(!u),className:"w-full h-10 px-4 rounded-xl border border-border bg-background text-sm flex items-center justify-between",children:[e.jsx("span",{children:T||c||"Select option"}),e.jsx("span",{className:"text-muted-foreground",children:"â¼"})]}),u&&e.jsxs("div",{className:"absolute z-50 top-11 left-0 right-0 bg-card border border-border rounded-xl shadow-lg flex flex-col max-h-[300px] overflow-hidden",children:[e.jsxs("div",{className:"p-2 border-b border-border flex items-center gap-2",children:[e.jsx(Ie,{className:"w-3.5 h-3.5 text-muted-foreground"}),e.jsx("input",{type:"text",className:"flex-1 bg-transparent text-sm outline-none",placeholder:"Search...",value:w,onChange:o=>x(o.target.value)})]}),e.jsxs("div",{className:"overflow-y-auto flex-1",children:[k.map(o=>e.jsxs("div",{className:"flex items-center justify-between px-3 py-2 hover:bg-accent cursor-pointer group",children:[l===o?e.jsx("input",{type:"text",className:"flex-1 bg-background border border-border rounded px-1 text-sm h-7",value:f,onChange:n=>A(n.target.value),onKeyDown:n=>{n.key==="Enter"&&(v(o,f),b(null))},autoFocus:!0}):e.jsx("span",{className:"text-sm flex-1",onClick:()=>{g(o),s(!1)},children:o}),e.jsxs("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[l===o?e.jsx("button",{type:"button",onClick:()=>{v(o,f),b(null)},className:"p-1 rounded hover:bg-success/10 text-success",children:e.jsx(Oe,{className:"w-3.5 h-3.5"})}):e.jsx("button",{type:"button",onClick:n=>{n.stopPropagation(),b(o),A(o)},className:"p-1 rounded hover:bg-primary/10 text-primary",children:e.jsx(ze,{className:"w-3.5 h-3.5"})}),e.jsx("button",{type:"button",onClick:n=>{n.stopPropagation(),confirm(`Delete "${o}"?`)&&h(o)},className:"p-1 rounded hover:bg-danger/10 text-danger",children:e.jsx(Z,{className:"w-3.5 h-3.5"})})]})]},o)),k.length===0&&e.jsx("div",{className:"p-3 text-xs text-muted-foreground text-center",children:"No results found"})]}),e.jsxs("div",{className:"p-2 border-t border-border flex items-center gap-2 bg-muted/10",children:[e.jsx("input",{type:"text",className:"flex-1 h-8 px-2 rounded-lg border border-border bg-background text-xs",placeholder:"Add new...",value:m,onChange:o=>p(o.target.value)}),e.jsx("button",{type:"button",onClick:()=>{m.trim()&&(j(m.trim()),p(""))},className:"h-8 px-3 rounded-lg bg-primary text-primary-foreground text-xs font-bold",children:"Add"})]})]})]})}function dt(){const N=ne();if(N)return N;const{pathname:T}=de();if(T.includes("/fixed-assets/new"))return e.jsx(Ve,{});const g=ce(),j=ie(),[v,h]=a.useState(!1),[c,u]=a.useState("general"),[s,w]=a.useState(null),[x,m]=a.useState(["IT Hardware","Furniture","Vehicle","Equipment"]),[p,l]=a.useState("IT Hardware"),{fmtConvCompact:b}=Ue(),{data:f,isLoading:A,isFetching:k,refetch:o}=ue({limit:500}
1),[n]=xe(),[ee]=me(),[q]=pe(),[te,B]=a.useState([]),[se,z]=a.useState(!1),ae=[{id:"fa-101",name:"Apple MacBook Pro M3 Max Workstations (10 Developer Units)",category:"IT Hardware",value:245e4,currentValue:21e5,purchaseDate:"2024-01-15",status:"Active",department:"Engineering",allocatedTo:"Rahul Sharma & Tech Team",location:"Tekki HQ Office"},{id:"fa-102",name:"Dell PowerEdge Rack Server R760 & SAN Storage Array",category:"IT Hardware",value:128e4,currentValue:11e5,purchaseDate:"2023-11-10",status:"Active",department:"DevOps",allocatedTo:"Vikram Singh",location:"Mohali Data Center"},{id:"fa-103",name:"Commercial 50KVA Silent Diesel Generator & Power Switch",category:"Equipment",value:65e4,currentValue:58e4,purchaseDate:"2022-09-05",status:"Active",department:"Facilities",allocatedTo:"Building Ops",location:"Utility Room"},{id:"fa-104",name:"APC High-Capacity Online Commercial UPS & 32-Battery Bank",category:"Equipment",value:38e4,currentValue:32e4,purchaseDate:"2023-03-20",status:"Active",department:"IT Infra",allocatedTo:"Server Room Ops",location:"Server Room"},{id:"fa-105",name:"Executive Ergonomic Mesh Chairs & Teak Conference Tables (30 Units)",category:"Furniture",value:45e4,currentValue:39e4,purchaseDate:"2023-06-20",status:"Active",department:"Operations",allocatedTo:"Shared Office",location:"Main Floor"},{id:"fa-106",name:"Daikin Heavy Duty Commercial Inverter AC Units (12 Units)",category:"Equipment",value:54e4,currentValue:46e4,purchaseDate:"2023-04-12",status:"Active",department:"Facilities",allocatedTo:"Office Admin",location:"Tekki HQ Premises"}],K=a.useMemo(()=>{const t=(f?.items??[]).map(Le);return t.length>0?t:ae},[f]),[D,F]=a.useState(""),[P,E]=a.useState(""),[M,I]=a.useState(0),[G,O]=a.useState(""),[Q,V]=a.useState("Active"),[re,L]=a.useState("Engineering"),[oe,R]=a.use
1State("John Doe"),[W,U]=a.useState("Main Office");a.useEffect(()=>{E(""),s?(F(s.name||""),I(s.value||0),O(s.purchaseDate||""),V(s.status||"Active"),L(s.department||"Engineering"),R(s.allocatedTo||"John Doe"),U(s.location||"Main Office"),l(s.category||"IT Hardware")):(F(""),I(0),O(new Date().toISOString().split("T")[0]),V("Active"),L("Engineering"),R(""),U("Main Office"),l("IT Hardware"))},[s,v]);const y=K,_=y.reduce((t,r)=>t+r.value,0),J=y.reduce((t,r)=>t+r.currentValue,0),le=_-J,H=a.useMemo(()=>y.map(t=>{const r=t;return{...t,status:r.status||"Active",department:r.department||"Engineering",allocatedTo:r.allocatedTo||"N/A",warrantyExpiry:r.warrantyExpiry||"2027-12-31",amcExpiry:r.amcExpiry||"2026-06-30"}}),[y]),[$,Ge]=a.useState(""),[Qe,We]=a.useState(!1);return a.useMemo(()=>{if(!$.trim())return H;const t=$.toLowerCase();return H.filter(r=>r.name.toLowerCase().includes(t)||r.status?.toLowerCase().includes(t)||r.department?.toLowerCase().includes(t))},[H,$]),e.jsxs("div",{className:"flex flex-col flex-1 min-h-0 bg-slate-50/50 relative",children:[e.jsx(he,{title:"Fixed Assets",subtitle:"Enterprise Asset Register & Lifecycle Management",accentVar:"--mod-finance",showMonthYearFilter:!1}),e.jsx("div",{className:"shrink-0 bg-surface/50 border-b border-border px-4 py-2 flex items-center justify-between flex-wrap gap-2",children:e.jsx(qe,{showMonths:!0,actions:e.jsx(be,{delayDuration:150,children:e.jsxs(fe,{children:[e.jsx(ge,{asChild:!0,children:e.jsx(je,{type:"button",onClick:()=>g(`${j}/fixed-assets/new`),className:"h-8 w-8 p-0 rounded-lg bg-blue-600 hover:bg-blue-700 text-white inline-flex items-center justify-center shadow-2xs transition-colors shrink-0 cursor-pointer","aria-label":"Add Asset",children:e.jsx(ve,{className:"w-4 h-4"})})}),e.jsx(ye,{side:"bottom",align:"end",className:"text-xs font-medium",children:"Add Asset"})]})})})}),e.jsxs("div",{className:"p-3 pb-3 flex-1 min-h-0 flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2 shrink-0 mb-3",children:[e.jsx(S,{label:"Gross Asset Value",value:_,trend:9.2,accent:"mod-finance"}),e.jsx(S,{label:"Accumulated Depreciation",value:le,trend:4.6,accent:"mod-expense"}),e.jsx(S,{label:"Net Book Value",value:J,trend:6.4,accent:"mod-revenue"}),e.jsx(S,{label:"Total Assets",value:K.length,trend:3.1,accent:"mod-team",isCount:!0})]}),e.jsx(Ne,{selectable:!0,selectedIds:te,onSelectionChange:B,bulkActions:[{id:"delete",label:"Delete Selected",variant:"destructive",onAction:async t=>{if(confirm(`Delete ${t.length} selected asset(s)?`)){for(const r of t)try{await q(r.id).unwrap()}catch{}d.success(`Deleted ${t.length} asset(s)`),B([])}}}],rows:y,rowKey:t=>t.id,searchKeys:["name","category","status","allocatedTo","location"],searchPlaceholder:"Search assets...",storageKey:"finance-fixed-assets",initialPageSize:10,fetching:k||A||se,onRefresh:async()=>{z(!0),await o(),setTimeout(()=>z(!1),500)},fillHeight:!0,columns:[{key:"id",label:"ID",width:"70px",sortable:!0},{key:"name",label:"Asset Name",sortable:!0,render:t=>e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"font-semibold",children:t.name}),e.jsx("span",{className:"text-[10px] text-muted-foreground",children:t.category})]})},{key:"allocatedTo",label:"Allocation",width:"170px",sortable:!0,render:t=>e.jsxs("div",{className:"flex flex-col gap-0.5 text-[10px]",children:[e.jsx("span",{className:"font-semibold text-foreground",children:t.allocatedTo}),t.department&&e.jsx(Be,{name:t.department,className:"mt-0.5"})]})},{key:"purchaseDate",label:"Purchased",width:"90px",sortable:!0},{key:"value",label:"Cost",align:"right",width:"100px",sortable:!0,sortValue:t=>t.value,render:t=>e.jsx("span",{className:"font-data",children:b(t.value)})},{key:"currentValue",label:"Net Value",align:"right",width:"100px",sortable:!0,sortValue:t=>t.currentValue,render:t=>e.jsx("span",{className:"font-data font-semibold",children:b(t.currentValue)})},{key:"status",label:"Status",width:"100px",sortable:!0,render:t=>{const r={Active:"bg-success/12 text-success","Under Repair":"bg-warning/12 text-warning",Disposed:"bg-danger/12 text-danger",Transferred:"bg-primary/12 text-primary",Lost:"bg-danger/20 text-danger font-bold",Purchased:"bg-info/12 text-info",Ordered:"bg-muted text-muted-foreground"};return e.jsx("span",{className:C("text-[10px] px-1.5 py-0.5 rounded font-semibold",r[t.status]||"bg-muted"),children:t.status})}},{key:"actions",label:"ACTIONS",width:"160px",align:"center",sortable:!1,fixed:"right",render:t=>e.jsxs("div",{className:"flex items-center gap-1 justify-center",onClick:r=>r.stopPropagation(),children:[e.jsx("button",{onClick:()=>g(`${j}/fixed-assets/new?editId=${t.id}
1`),className:"p-1 rounded hover:bg-slate-100 dark:hover:bg-slate-800 text-slate-600 dark:text-slate-300 transition-colors",title:"View/Edit",children:e.jsx(we,{className:"w-3.5 h-3.5"})}),e.jsx("button",{onClick:()=>{w(t),h(!0),u("attachments")},className:"p-1 rounded hover:bg-accent hover:text-foreground transition-colors",title:"Attachments",children:e.jsx(Y,{className:"w-3.5 h-3.5"})}),e.jsx("button",{onClick:()=>d.success("Transfer initiated"),className:"p-1 rounded hover:bg-accent hover:text-foreground transition-colors",title:"Transfer",children:e.jsx(Ae,{className:"w-3.5 h-3.5"})}),e.jsx("button",{onClick:async()=>{confirm("Are you sure you want to delete this asset?")&&(await q(t.id).unwrap(),d.success("Asset deleted successfully"))},className:"p-1 rounded hover:bg-rose-50 text-rose-600 transition-colors",title:"Delete",children:e.jsx(Z,{className:"w-3.5 h-3.5"})})]})}],onRowClick:t=>g(`${j}/fixed-assets/new?editId=${t.id}`)})]}),v&&e.jsx("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-card border border-border rounded-2xl shadow-2xl max-w-4xl w-full max-h-[85vh] overflow-hidden flex flex-col animate-in fade-in zoom-in-95 duration-200",children:[e.jsxs("div",{className:"px-6 py-4 border-b border-border flex items-center justify-between bg-muted/10",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-black",children:s?`Manage Asset: ${s.name}`:"Add New Asset"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Complete lifecycle and document tracking"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{className:"h-8 px-3 rounded-lg border border-border text-xs font-bold flex items-center gap-1.5 hover:bg-accent",children:[e.jsx(ke,{className:"w-3.5 h-3.5"}),"Generate Tag"]}),e.jsx("button",{onClick:()=>h(!1),className:"w-8 h-8 rounded-full flex items-center justify-center hover:bg-accent transition-colors",children:e.jsx(Ce,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"flex border-b border-border bg-muted/20",children:[e.jsx("button",{onClick:()=>u("general"),className:C("flex-1 py-3 text-xs font-bold transition-all",c==="general"?"bg-card text-primary border-b-2 border-primary":"text-muted-foreground hover:text-foreground"),children:"General Info"}),e.jsx("button",{onClick:()=>u("attachments"),className:C("flex-1 py-3 text-xs font-bold transition-all",c==="attachments"?"bg-card text-primary border-b-2 border-primary":"text-muted-foreground hover:text-foreground"),children:"Attachments"}),e.jsx("button",{onClick:()=>u("history"),className:C("flex-1 py-3 text-xs font-bold transition-all",c==="history"?"bg-card text-primary border-b-2 border-primary":"text-muted-foreground hover:text-foreground"),children:"History & Logs"})]}),e.jsxs("div",{className:"p-6 overflow-y-auto flex-1",children:[c==="general"&&e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsx(He,{className:"col-span-2",label:"Asset Name",required:!0,error:P,children:e.jsx("input",{type:"text",className:$e(!!P,"w-full h-10 px-4 rounded-xl border border-border bg-background text-sm"),value:D,onChange:t=>{F(t.target.value),P&&E("")}})}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold text-muted-foreground uppercase tracking-widest",children:"Category"}),e.jsx(Ke,{options:x,value:p,onChange:l,onAdd:t=>{m([...x,t]),l(t),d.success(`"${t}" added`)},onEdit:(t,r)=>{m(x.map(X=>X===t?r:X)),p===t&&l(r),d.success(`Updated to "${r}"`)},onDelete:t=>{m(x.filter(r=>r!==t)),p===t&&l(x[0]||""),d.success(`"${t}" deleted`)},placeholder:"Select Category"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold text-muted-foreground uppercase tracking-widest",children:"Cost"}),e.jsx("input",{type:"number",className:"w-full h-10 px-4 rounded-xl border border-border bg-background text-sm",value:M,onChange:t=>I(Number(t.target.value))})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold text-muted-foreground uppercase tracking-widest",children:"Purchase Date"}),e.jsx(Se,{value:G,onChange:O})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold text-muted-foreground uppercase tracking-widest",children:"Lifecycle Status"}),e.jsxs(Te,{value:Q,onValueChange:t=>
1V(t),children:[e.jsx(De,{className:"w-full h-10 px-4 rounded-xl border border-border bg-background text-sm",children:e.jsx(Fe,{})}),e.jsxs(Pe,{children:[e.jsx(i,{value:"Requested",children:"Requested"}),e.jsx(i,{value:"Ordered",children:"Ordered"}),e.jsx(i,{value:"Purchased",children:"Purchased"}),e.jsx(i,{value:"Active",children:"Active"}),e.jsx(i,{value:"Under Repair",children:"Under Repair"}),e.jsx(i,{value:"Disposed",children:"Disposed"}),e.jsx(i,{value:"Transferred",children:"Transferred"}),e.jsx(i,{value:"Lost",children:"Lost"})]})]})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold text-muted-foreground uppercase tracking-widest",children:"Department"}),e.jsx("input",{type:"text",className:"w-full h-10 px-4 rounded-xl border border-border bg-background text-sm",value:re,onChange:t=>L(t.target.value)})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold text-muted-foreground uppercase tracking-widest",children:"Allocated To"}),e.jsx("input",{type:"text",className:"w-full h-10 px-4 rounded-xl border border-border bg-background text-sm",value:oe,onChange:t=>R(t.target.value)})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"text-[10px] font-bold text-muted-foreground uppercase tracking-widest",children:"Location"}),e.jsx("input",{type:"text",className:"w-full h-10 px-4 rounded-xl border border-border bg-background text-sm",value:W,onChange:t=>U(t.target.value)})]}),e.jsxs("div",{className:"col-span-3 grid grid-cols-2 gap-4 p-3 bg-muted/20 rounded-xl",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-bold",children:"Warranty Expiry"}),e.jsx("p",{className:"text-xs text-danger font-medium",children:s?.warrantyExpiry||"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-bold",children:"AMC Expiry"}),e.jsx("p",{className:"text-xs text-warning font-medium",children:s?.amcExpiry||"N/A"})]})]})]}),c==="attachments"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"border-2 border-dashed border-border rounded-xl p-6 text-center hover:bg-muted/10 transition-colors cursor-pointer",children:[e.jsx(Y,{className:"w-8 h-8 text-muted-foreground mx-auto mb-2"}),e.jsx("p",{className:"text-xs font-bold",children:"Drag and drop files here, or click to browse"}),e.jsx("p",{className:"text-[10px] text-muted-foreground mt-1",children:"Upload Invoices, Warranty Cards, Insurance, Photos, AMC Docs"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-[10px] font-bold text-muted-foreground uppercase tracking-widest",children:"Uploaded Files"}),e.jsxs("div",{className:"flex items-center justify-between p-3 border border-border rounded-xl bg-background",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"w-4 h-4 text-primary"}),e.jsxs("div",{children:[e.jsxs("p",{className:"text-xs font-bold",children:["Invoice_",s?.id||"NEW",".pdf"]}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:"1.2 MB ⢠Uploaded on May 01, 2026"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{className:"text-[10px] font-bold text-primary hover:underline",children:"Preview"}),e.jsx("button",{className:"text-[10px] font-bold text-danger hover:underline",children:"Delete"})]})]})]})]}),c==="history"&&e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-[10px] font-bold text-muted-foreground uppercase tracking-widest",children:"Asset Lifecycle & Audit Trail"}),e.jsxs("div",{className:"relative pl-6 space-y-4 before:absolute before:left-2 before:top-1.5 before:bottom-1.5 before:w-0.5 before:bg-border",children:[e.jsxs("div",{className:"relative before:absolute before:left-[-22px] before:top-1.5 before:w-3 before:h-3 before:rounded-full before:bg-success",children:[e.jsx("p",{className:"text-xs font-bold",children:"Asset Activated"}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:"May 01, 2026 by Admin"}),e.jsxs("p",{className:"text-[10px] mt-0.5",children:["Allocated to ",s?.allocatedTo," (",s?.department,")"]})]}),e.jsxs("div",{className:"relative before:absolute before:left-[-22px] before:top-1.5 before:w-3 before:h-3 before:rounded-full before:bg-primary",children:[e.jsx("p",{className:"text-xs font-bold",children:"Physical Verification"}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Apr 15, 2026 by Auditor"}),e.jsxs("p",{className:"text-[10px] mt-0.5",children:["Verified at location: ",s?.location]})]}),e.jsxs("div",{className:"relative before:absolute before:left-[-22px] before:top-1.5 before:w-3 before:h-3 before:rounded-full before:bg-muted-foreground",children:[e.jsx("p",{className:"text-xs font-bold",children:"Asset Purchased"}),e.jsxs("p",{className:"text-[10px] text-muted-foreground",children:[s?.purchaseDate," by Procurement"]})]})]})]})]}),e.jsxs("div",{className:"p-6 border-t border-border flex items-center justify-between bg-muted/10",children:[e.jsx("div",{className:"text-[10px] text-muted-foreground",children:"Auto-depreciation active: SLM method applied monthly."}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{onClick:()=>h(!1),className:"h-10 px-5 rounded-xl border border-border hover:bg-accent text-xs font-bold transition-all",children:"Cancel"}),e.jsxs("button",{onClick:async()=>
1{if(!D.trim()){E("Asset name is required");return}const t=Re({name:D,category:p,value:M,currentValue:s?.currentValue??M,depPct:s?.depPct??33,purchaseDate:G,status:Q,location:W});try{s?(await ee({id:s.id,body:t}).unwrap(),d.success("Asset updated successfully!")):(await n(t).unwrap(),d.success("Asset added successfully!")),h(!1)}catch{d.error("Failed to save asset")}},className:"h-10 px-6 rounded-xl bg-primary text-primary-foreground hover:opacity-90 text-xs font-bold transition-all shadow-[0_4px_14px_0_rgba(var(--primary-rgb),0.39)] flex items-center gap-2",children:[e.jsx(Me,{className:"w-4 h-4"}),"Save Asset"]})]})]})]})})]})}export{dt as FixedAssetsPage};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.