1import{i as e}from"./rolldown-runtime-Bq0epICq.js";import{A as s,C as a,h as t,t as r,ut as i,w as l}from"./@gravity-ui-Enuc-IwO.js";import{Mn as n,N as c,St as d,Tt as m,Vt as o,Xt as x,cn as h,fn as j,hn as p,yt as u}from"./@front-8msnzfD4.js";import{a as f,c as v,t as N}from"./hooks-BQcZuKJT.js";import{c as w}from"./dayjs-YJOiQelf.js";import{I as g,L as C}from"./@floating-ui-Ds9Lmfct.js";import{b as y,s as b,u as k}from"./index-DzDVflDn.js";import{t as D}from"./ErrorBoundary-C2WhIpLL.js";import{D as M,S as Y,x as L}from"./utils-D9-qRHBI.js";import{t as I}from"./Rangepicker-CEMAZz56.js";import{t as H}from"./Status-CYiNseyb.js";import{t as S}from"./TerminalDetail-NKBXciuw.js";import"./useDrawers-BWN05qRx.js";import{t as T}from"./EmptyState-Bbl5n53A.js";import{t as P}from"./LoaderState-Cdl8q5Pk.js";import{a as z,i as E,n as A,o as R,r as Z,t as $}from"./PaymentLinkDetailsSkeleton-D0gpJzTY.js";import{a as U,r as _}from"./PaymentLinks-C8HbhSag.js";var B=e(w(),1),F=e(C()),O=g(),J=e=>(0,O.jsxs)("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,O.jsx)("path",{d:"M13.25 14L15.25 12.25M15.25 12.25L13.25 10.5M15.25 12.25L10 12.25",stroke:"white",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),(0,O.jsx)("path",{d:"M2.5 5C3.19036 5 3.75 4.44036 3.75 3.75C3.75 3.05964 3.19036 2.5 2.5 2.5C1.80964 2.5 1.25 3.05964 1.25 3.75C1.25 4.44036 1.80964 5 2.5 5Z",fill:"white"}),(0,O.jsx)("path",{d:"M5.75 3C5.33579 3 5 3.33579 5 3.75C5 4.16421 5.33579 4.5 5.75 4.5H14.25C14.6642 4.5 15 4.16421 15 3.75C15 3.33579 14.6642 3 14.25 3H5.75Z",fill:"white"}),(0,O.jsx)("path",{d:"M5.75 11.5C5.33579 11.5 5 11.8358 5 12.25C5 12.6642 5.33579 13 5.75 13H6.75C7.16421 13 7.5 12.6642 7.5 12.25C7.5 11.8358 7.16421 11.5 6.75 11.5H5.75Z",fill:"white"}),(0,O.jsx)("path",{d:"M5 8C5 7.58579 5.33579 7.25 5.75 7.25H14.25C14.6642 7.25 15 7.58579 15 8C15 8.41421 14.6642 8.75 14.25 8.75H5.75C5.33579 8.75 5 8.41421 5 8Z",fill:"white"}),(0,O.jsx)("path",{d:"M3.75 8C3.75 8.69036 3.19036 9.25 2.5 9.25C1.80964 9.25 1.25 8.69036 1.25 8C1.25 7.30964 1.80964 6.75 2.5 6.75C3.19036 6.75 3.75 7.30964 3.75 8Z",fill:"white"}),(0,O.jsx)("path",{d:"M2.5 13.5C3.19036 13.5 3.75 12.9404 3.75 12.25C3.75 11.5596 3.19036 11 2.5 11C1.80964 11 1.25 11.5596 1.25 12.25C1.25 12.9404 1.80964 13.5 2.5 13.5Z",fill:"white"})]}),V=({linkId:e,onClose:s})=>{const a=c(),{data:t,isLoading:r}=R(e),{handleCopy:i}=N(),{showDrawer:m}=f(),j=(0,F.useCallback)(()=>{s()},[s]);if((0,F.useEffect)(()=>{const e=e=>{"Escape"===e.key&&j()};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[j]),r||!t)return(0,O.jsx)($,{handleClose:j});const{orderId:p,successRedirectUrl:u,failRedirectUrl:v,url:w,isArbitraryAmountAllowed:g,amount:C,currency:b,type:k,creationTime:D,lastModificationTime:Y,terminalName:I,terminalId:T,expirationDateTime:P,description:z,productType:E}=t;return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("div",{className:"p-24 flex justify-between items-center",children:(0,O.jsxs)("div",{className:"w-full",children:[(0,O.jsxs)("div",{className:"flex items-center gap-8 w-full",children:[(0,O.jsxs)("div",{className:"text-subheader-3",children:[g?"min. ":"",L(C)," ",b]}),(0,O.jsx)(x,{view:"flat",onClick:j,className:"cursor-pointer ml-auto",children:(0,O.jsx)(n,{data:h,size:16,className:"cursor-pointer"})})]}),(0,O.jsx)(d,{className:"mt-10",interactive:!0,type:"copy",onClick:()=>e&&i(e),value:e,children:"PaymentLink ID"})]})}),(0,O.jsx)(o,{}),(0,O.jsxs)("div",{className:"p-24 overflow-y-scroll h-full",children:[(0,O.jsxs)("div",{children:[(0,O.jsxs)("div",{className:"flex items-start justify-between",children:[(0,O.jsxs)("div",{className:"flex-1 text-subheader-2",children:[U[k]," плаÑÐµÐ¶Ð½Ð°Ñ ÑÑÑлка"]}),(0,O.jsxs)(x,{view:"action",size:"xs",onClick:()=>a(`/transactions?paymentLinkId=${e}`),children:["ÐайÑи ÑÑанзакÑии",(0,O.jsx)(n,{data:J,size:16,className:"text-secondary cursor-pointer"})]})]}),(0,O.jsx)("div",{className:"flex items-center wrap mt-10",children:(0,O.jsx)("a",{href:w||"#",target:"_blank",className:"g
1-link g-link_view_normal flex items-center gap-4",children:w})})]}),(0,O.jsx)(o,{className:"mt-24 mb-24"}),(0,O.jsxs)("div",{children:[(0,O.jsxs)("div",{className:"flex items-center",children:[(0,O.jsx)("div",{className:"w-[190px] text-subheader-2",children:"СÑаÑÑÑ"}),(0,O.jsxs)("div",{className:"flex items-center gap-8",children:[(0,O.jsx)(H,{statusesMap:_,status:"Opened"}),(0,B.default)(D).format("DD.MM.YYYY в HH:mm")]})]}),Y&&(0,O.jsxs)("div",{className:"flex items-center mt-8",children:[(0,O.jsx)("div",{className:"w-[190px]"}),(0,O.jsxs)("div",{className:"flex items-center gap-8",children:[(0,O.jsx)(H,{statusesMap:_,status:"Closed"}),(0,B.default)(Y).format("DD.MM.YYYY в HH:mm")]})]})]}),(0,O.jsx)(o,{className:"mt-24 mb-24"}),(0,O.jsxs)("div",{children:[(0,O.jsxs)("div",{className:"flex items-center",children:[(0,O.jsx)("div",{className:"w-[190px] text-subheader-2",children:"ÐаÑамеÑÑÑ"}),(0,O.jsx)("div",{})]}),P&&(0,O.jsxs)("div",{className:"flex items-center mt-14",children:[(0,O.jsx)("div",{className:"w-[190px]",children:"ÐейÑÑвÑÐµÑ Ð´Ð¾"}),(0,O.jsx)("div",{className:"flex-1 truncate",children:(0,B.default)(P).format("DD.MM.YYYY HH:mm")})]}),(0,O.jsxs)("div",{className:"flex items-center mt-14",children:[(0,O.jsx)("div",{className:"w-[190px]",children:"ТеÑминал"}),I||T?(0,O.jsx)(l,{content:I,placement:"top",openDelay:300,children:(0,O.jsx)("div",{className:"flex-1 truncate cursor-pointer text-[var(--g-color-text-info)]",onClick:()=>(e=>{e&&m(y,{content:S,terminalId:e})})(T),children:I??"ââ"})}):(0,O.jsx)("div",{children:"ââ"})]}),(0,O.jsxs)("div",{className:"flex items-center mt-14",children:[(0,O.jsx)("div",{className:"w-[190px]",children:"Тип пÑодÑкÑа"}),(0,O.jsx)("div",{className:"flex-1 truncate",children:E?M[E]:"ââ"})]}),(0,O.jsxs)("div",{className:"flex items-center mt-14",children:[(0,O.jsx)("div",{className:"w-[190px]",children:"ÐалÑÑа"}),(0,O.jsx)("div",{children:b??"ââ"})]}),(0,O.jsxs)("div",{className:"flex items-start mt-14",children:[(0,O.jsx)("div",{className:"w-[190px]",children:"ÐпиÑание"}),(0,O.jsx)("div",{className:"overflow-hidden text-ellipsis flex-1",children:z??"ââ"})]}),(0,O.jsxs)("div",{className:"flex items-center mt-14",children:[(0,O.jsx)("div",{className:"w-[190px]",children:"Order ID"}),(0,O.jsx)("div",{className:"truncate flex-1",title:p??"",children:p??"ââ"})]}),(0,O.jsxs)("div",{className:"flex items-center mt-14",children:[(0,O.jsx)("div",{className:"w-[190px]",children:"Success Page"}),(0,O.jsx)(l,{content:u,placement:"top",openDelay:300,children:(0,O.jsx)("div",{className:"flex-1 truncate",children:u??"ââ"})})]}),(0,O.jsxs)("div",{className:"flex items-center mt-14",children:[(0,O.jsx)("div",{className:"w-[190px]",children:"Fail Page"}),(0,O.jsx)(l,{content:v,placement:"top",openDelay:300,children:(0,O.jsx)("div",{className:"flex-1 truncate",children:v??"ââ"})})]})]})]})]})},W=({data:e})=>{const{handleCopy:s}=N(),{showModal:t}=v(),{showDrawer:l}=f(),[c,d]=(0,F.useState)(void 0);return(0,O.jsx)(r,{columns:[{name:"creationTime",header:(0,O.jsx)("div",{className:"text-subheader-1",children:"ÐаÑа ÑозданиÑ"}),sortable:!1,render:({row:e})=>(0,O.jsx)("div",{className:"truncate flex items-center h-[26px]",children:e.creationTime?(0,B.default)(e.creationTime).format("DD.MM.YYYY в HH:mm"):"ââ"})},{name:"expirationDateTime",header:(0,O.jsx)("div",{className:"text-subheader-1",children:"ÐейÑÑвÑÐµÑ Ð´Ð¾"}),sortable:!1,render:({row:e})=>(0,O.jsx)("div",{className:"truncate flex items-center h-[26px]",children:e.expirationDateTime?(0,B.default)(e.expirationDateTime).format("DD.MM.YYYY HH:mm"):"ââ"})},{name:"terminalName",header:(0,O.jsx)("div",{className:"text-subheader-1",children:"ТеÑминал"}),sortable:!1,render:({row:e})=>(0,O.jsx)("div",{className:"flex items-center h-[26px]",children:(0,O.jsx)("span",{className:"truncate",children:e.terminalName?e.terminalName:"ââ"})})},{name:"orderId",width:"30%",header:(0,O.jsx)("div",{className:"text-subheader-1",children:"Order ID"}),sortable:!1,render:({row:e})=>(0,O.jsx)("div",{className:"flex items-center h-[26px]",children:(0,O.jsx)("span",{className:"flex-1 truncate",children:e.orderId?e.orderId:"ââ"})})},{name:"type",header:(0,O.jsx)("div",{className:"text-subheader-1",children:"Тип"}),sortable:!1,render:({row:e})=>(0,O.jsx)("div",{className:"flex items-center h-[26px]",children:(0,O.jsx)("span",{className:"flex-1 truncate",children:U[e.type]??"ââ"})})},{name:"status",header:(0,O.jsx)("div",{className:"text-subheader-1",children:"СÑаÑÑÑ"}),sortable:!1,render:({row:e})=>(0,O.jsx)("div",{className:"flex items-center h-[26px]",children:e.status?(0,O.jsx)(H,{statusesMap:_,status:e.status}):"ââ"})},{name:"amount",header:(0,O.jsx)("div",{className:"text-subheader-1",children:"СÑмма"}),sortable:!1,align:"right",render:({row:e})=>(0,O.jsx)("div",{className:"flex items-center justify-end h-[26px]",children:e.amount?`${e.isArbitraryAmountAllowed?"min. ":""}${L(e.amount)} ${e.currency}`:"ââ"})},{name:"copyLink",header:(0,O.jsx)("div",{className:"text-subheader-1"}),sortable:!1,width:44,align:"right",render:({row:e})=>(0,O.jsx)(x,{view:"flat",onClick:a=>{a.stopPropagation(),e.url&&s(e.url)},className:"ml-auto",children:(0,O.jsx)(n,{data:p,size:16,className:"text-secondary cursor-pointer"})})},{name:"url",header:(0,O.jsx)("div",{className:"text-subheader-1"}),sortable:!1,width:44,align:"right",render:({row:e})=>(0,O.jsx)(x,{view:"flat",className:"ml-auto flex items-center h-[26px]",onClick:s=>{return e.url&&(a=e.url,s.stopPropagation(),void window.open(a));var a},children:(0,O.jsx)(n,{data:i,className:"text-secondary cursor-pointer"})})},{name:"action",header:(0,O.jsx)("div",{className:"text-subheader-1"}),width:44,align:"right",render:({row:e})=>(0,O.jsx)(a,{popupProps:{placement:"left-start"},onSwitcherClick:e=>{e.stopPropagation()},switcherWrapperClassName:"user-table-action-btn text-secondary",defaultSwitcherClassName:"text-secondary",size:"m",items:A({status:e.status,paymentId:e.id,showModal:t})})}],data:e,theme:"yandex-cloud",settings:{displayIndices:!1,highlightRows:!0,sortable:!1,disableSortReset:!0,externalSort:!0},onRowClick:e=>{d(e.id),e&&l(k,{content:V,linkId:e.id})},rowClassName:(e,s,a,t)=>`${t?"":"cursor-pointer"} ${c===e.id?"bg-[var(--g-color-base-simple-hover)]":""}`})},K=D(()=>{const{showModal:e}=v(),{isLoading:a,paymentLinks:r,handleSearch:i,onPaginationUpdate:l,store:c,totalCount:d,isDefaultParams:h}=z(),{filterSearch:p,filterDates:f,setFilter:N,pagination:w}=c;return(0,O.jsxs)("div",{className:"p-20 w-full h-full",children:[(0,O.jsxs)("div",{className:"flex justify-between items-center w-full",children:[(0,O.jsx)("div",{className:"text-header-1",children:"ÐлаÑежнÑе ÑÑÑлки"}),(0,O.jsxs)(x,{view:"action",size:"m",onClick:()=>e(b,{content:Z}),children:[(0,O.jsx)(n,{data:s,size:18}),"СоздаÑÑ ÑÑÑлкÑ"]})]}),(0,O.jsx)(o,{className:"mt-10"}),(0,O.jsxs)("div",{className:"flex flex-col",children:[(0,O.jsxs)("div",{className:"w-full mt-20 flex items-center gap-10",children:[(0,O.jsx)(m,{placeholder:"ÐÑкаÑÑ Ð¿Ð¾ ÑÑмме, номеÑÑ Ð·Ð°ÐºÐ°Ð·Ð° или PaymentLink ID",startContent:(0,O.jsx)(n,{data:j,className:"text-secondary"}),hasClear:!0,value:p,onChange:e=>i(e.target.value),type:"text"}),(0,O.jsx)(I,{label:"ÐеÑиод ",className:"w-full max-w-[360px]",value:f?Y(f):null,onUpdate:e=>N("filterDates",e)})]}),a?(0,O.jsx)(t,{className:"h-28 w-full mt-10",height:28}):(0,O.jsx)(E,{})]}),(0,O.jsxs)("div",{className:"mt-20 relative",children:[0===r?.length&&(0,O.jsx)(T,{type:h?"paymentLinks":"default"}),Boolean(r?.length)&&(0,O.jsx)(W,{data:r}),0===r?.length&&h&&(0,O.jsx)("div",{className:"w-full flex justify-center mt-10",children:(0,O.jsxs)(x,{view:"action",size:"m",onClick:()=>e("CREATE_PAYMENT_LINK",{content:Z}),children:[(0,O.jsx)(n,{data:s,size:18}),"СоздаÑÑ ÑÑÑлкÑ"]})}),a&&(0,O.jsx)(P,{}),r?.length>0&&(0,O.jsx)(u,{className:"mt-20",page:w?.page||1,pageSize:100,total:d,compact:!1,showInput:!0,onUpdate:l})]})]})});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.