"use strict";(globalThis.webpackChunk_kenyaemr_esm_stock_management_app=globalThis.webpackChunk_kenyaemr_esm_stock_management_app||[]).push([[428],{2428:(e,n,t)=>{t.r(n),t.d(n,{default:()=>u});var a=t(16072),l=t.n(a),r=t(51082),i=t(53941);const u=function(e){var n=e.closeModal,t=e.expiredStock,a=(0,i.useTranslation)().t,u=[{key:"drugName",header:a("drugName","Drug Name")},{key:"batchNo",header:a("batchNo","Batch No")},{key:"quantity",header:a("quantity","Quantity")},{key:"dispensingUnitName",header:a("dispensingUnitName","Unit")},{key:"expiration",header:a("expiration","Expiration Date")}];return l().createElement(l().Fragment,null,l().createElement(r.rQ0,{closeModal:n,title:a("expiredStock","Expired stock")}),l().createElement(r.cwr,null,t.length>0?l().createElement(r.K3K,null,l().createElement(r.XIK,null,l().createElement(r.ndF,null,l().createElement(r.Hjg,null,u.map(function(e){return l().createElement(r.A0N,{key:e.key},e.header)}))),l().createElement(r.BFY,null,t.map(function(e,n){return l().createElement(r.Hjg,{key:n},l().createElement(r.nA6,null,(null==e?void 0:e.drugName)||"N/A"),l().createElement(r.nA6,null,(null==e?void 0:e.batchNo)||"N/A"),l().createElement(r.nA6,null,(null==e?void 0:e.quantity)||"N/A"),l().createElement(r.nA6,null,(null==e?void 0:e.dispensingUnitName)||"N/A"),l().createElement(r.nA6,null,function(e){if(!e)return"N/A";var n=new Date(e);return new Intl.DateTimeFormat("en-GB",{year:"numeric",month:"short",day:"2-digit"}).format(n)}(null==e?void 0:e.expiration)))})))):l().createElement("p",null,a("noExpiredStockDataAvailable","No expired stock data available."))))}}}]);