1import{aC as E,aq as X,r as i,aD as I,aE as G,aA as H,w as e,P as R,L as T,A as r,aF as W,aG as $,aH as q,ak as z}from"./index-8acdbf7a.js";const K=()=>{const{isLoading:g,data:o}=E(""),Y=X(),[n,d]=i.useState([]),[y,{isLoading:p,data:L}]=I(),[f,{isLoading:j,data:b}]=G();i.useEffect(()=>{if(b){const t=b.NewsId;window.open(`/${Y}/news-release/upload/india?id=${btoa(t)}`),window.close()}},[j,b]),i.useEffect(()=>{},[p,L]),i.useEffect(()=>{o&&d(o)},[g,o]);const[c,h]=i.useState(1),m=10,D=c*m,S=D-m,l=n==null?void 0:n.slice(S,D),N=Math.ceil((n==null?void 0:n.length)/m),v=()=>{c>1&&h(c-1)},k=()=>{c<N&&h(c+1)},w=t=>{h(t)},A=new H(n,{keys:["headLine","DateLine","Contributor","DateAndTime","Language","Genre"]}),P=t=>{const u=t.currentTarget.value;if(u=="")d(o);else{const s=A.search(u).map(a=>({...a.item}));h(1),s.length>0?d(s):d([])}};return e.jsxs("div",{className:"p-3",children:[e.jsx(R,{title:"XHTML Release List"}),e.jsxs("div",{className:"card card-body border-primary table-responsive",children:[e.jsx("div",{children:e.jsx("input",{type:"search",placeholder:"Search here",onKeyUp:P,className:"form-control"})}),e.jsxs("table",{className:"mt-3 table table-striped table-bordered table-hover table-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Action"}),e.jsx("th",{children:"News HeadLine"}),e.jsx("th",{children:"Distribution Code"}),e.jsx("th",{style:{minWidth:180},children:"News Date & Time"}),e.jsx("th",{children:"Distribution Date & Time"}),e.jsx("th",{children:"Distribution Type"}),e.jsx("th",{children:"Action"})]})}),e.jsxs("tbody",{children:[(g||j||p)&&e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:"text-center",children:e.jsx(T,{})})}),(l==null?void 0:l.length)==0&&e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"text-center",children:"No Records Found"})}),l==null?void 0:l.map((t,u)=>{var M;const s=(M=t.SentFrom)==null?void 0:M.filter(x=>x.key=="DistributionDateAndTime"),a=(s==null?void 0:s.length)>0?r(s[0].value).format("YYYY-MM-DDThh:mm:ss"):"",C=(s==null?void 0:s.length)>0?r.utc(s[0].value).format("MMMM DD, YYYY hh:mm")+" GMT":"";return e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("div",{className:"form-check ",children:e.jsx("label",{className:"form-check-label",children:e.jsx("input",{type:"checkbox",className:"form-check-input"})})})}),e.jsx("td",{children:e.jsx("button",{type:"button",className:"btn btn-link btn-sm text-start",onClick:()=>{console.log(a,"IST"),f({...t,DateAndTime:a||r(t.DateAndTime).format("YYYY-MM-DDThh:mm:ss")})},children:t.headLine})}),e.jsx("td",{children:t.SlugLine==""?"":`(BW)(${t.SlugLine})`}),e.jsxs("td",{style:{minWidth:180},children:[r.utc(t.DateAndTime).format("MMMM DD, YYYY hh:mm")," GMT"]}),e.jsx("td",{children:C}),e.jsx("td",{children:t.SentTo.map((x,F)=>{if(x.key=="DistributionType")return e.jsx(W.Fragment,{children:x.value},F.toString())})}),e.jsx("td",{children:e.jsxs("div",{className:"hstack",children:[e.jsx("button",{type:"button",className:"btn btn-sm text-primary",onClick:()=>{f({...t,DateAndTime:a||r(t.DateAndTime).format("YYYY-MM-DDThh:mm:ss")})},children:e.jsx($,{})}),e.jsx("button",{type:"button",className:"btn btn-sm text-danger",onClick:()=>{y(t.fileName)},children:e.jsx(q,{})})]})})]},u.toString())})]})]}),e.jsx(z,{currentState:c,handlePrev:v,handleNext:k,totalPost:N,handlePages:w,pageSize:m,siblingCount:1,totalRecord:n==null?void 0:n.length}),e.jsx("div",{className:"d-flex gap-2",children:j&&e.jsx(T,{})})]})]})};export{K as default};
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.