@inntechcorp/it-design 4.0.0-beta.5 → 4.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +71 -0
- package/MIGRATION.md +16 -1
- package/dist/cjs/_bundled/@radix-ui/primitive/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-compose-refs/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-context/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-dialog/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-dismissable-layer/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-focus-guards/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-focus-scope/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-id/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-portal/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-presence/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-primitive/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-slot/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-use-callback-ref/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-use-controllable-state/dist/index.js +1 -1
- package/dist/cjs/_bundled/@radix-ui/react-use-effect-event/dist/index.js +1 -0
- package/dist/cjs/back-top/index.js +1 -1
- package/dist/cjs/blocks/auth-complete/index.js +1 -0
- package/dist/cjs/blocks/auth-page/index.js +1 -0
- package/dist/cjs/blocks/banner/index.js +1 -1
- package/dist/cjs/blocks/casino-featured/index.js +1 -1
- package/dist/cjs/blocks/game-box/index.js +1 -1
- package/dist/cjs/blocks/game-carousel/index.js +1 -1
- package/dist/cjs/blocks/game-providers/logos.js +1 -1
- package/dist/cjs/blocks/game-shell/useDrawerChrome.js +1 -1
- package/dist/cjs/blocks/header/index.js +1 -1
- package/dist/cjs/blocks/login/index.js +1 -0
- package/dist/cjs/blocks/mega-menu/index.js +1 -1
- package/dist/cjs/blocks/multiple-jackpots/index.js +1 -1
- package/dist/cjs/blocks/signup/index.js +1 -0
- package/dist/cjs/blocks/slider/index.js +1 -1
- package/dist/cjs/blocks/tournaments/index.js +1 -1
- package/dist/cjs/blocks/user-hub/bonus.js +1 -1
- package/dist/cjs/blocks/user-hub/profile.js +1 -1
- package/dist/cjs/blocks/user-hub/table.js +1 -1
- package/dist/cjs/context/PortalDocumentContext.js +1 -1
- package/dist/cjs/context-menu/ContextMenu.js +1 -1
- package/dist/cjs/dialog/Dialog.js +1 -1
- package/dist/cjs/dropdown-menu/CheckIcon.js +1 -1
- package/dist/cjs/dropdown-menu/processChildren.js +1 -1
- package/dist/cjs/dropdown-menu/useMenuItemChrome.js +1 -1
- package/dist/cjs/dropdown-menu/useSubMenuRegistry.js +1 -1
- package/dist/cjs/floating/createFloatingTrigger.js +1 -1
- package/dist/cjs/helpers/phone/usePhoneCountry.js +1 -1
- package/dist/cjs/helpers/theme/createTheme.js +1 -1
- package/dist/cjs/helpers/theme/importShadcnTheme.js +1 -1
- package/dist/cjs/hooks/useFocusTrap.js +1 -1
- package/dist/cjs/hooks/useLoadMoreSentinel.js +1 -1
- package/dist/cjs/hooks/useOnESCKeyDown.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/modal/container/ModalContainer.js +1 -1
- package/dist/cjs/modal/index.js +1 -1
- package/dist/cjs/router/ITDLink.js +1 -1
- package/dist/cjs/router/context.js +1 -1
- package/dist/cjs/router/matchActive.js +1 -1
- package/dist/cjs/toast/index.js +1 -1
- package/dist/css/accordion.css +2 -2
- package/dist/css/alert.css +1 -1
- package/dist/css/announcement-bar.css +1 -1
- package/dist/css/auth-page.css +3 -3
- package/dist/css/avatar.css +1 -1
- package/dist/css/back-top.css +1 -1
- package/dist/css/badge.css +85 -81
- package/dist/css/base.css +22 -16
- package/dist/css/block-form.css +5 -3
- package/dist/css/blocks-shared.css +8 -6
- package/dist/css/button-group.css +1 -1
- package/dist/css/button.css +8 -6
- package/dist/css/calendar.css +1 -1
- package/dist/css/card.css +1 -1
- package/dist/css/casino-featured.css +1 -1
- package/dist/css/chart.css +1 -1
- package/dist/css/checkbox.css +2 -2
- package/dist/css/code-input.css +5 -5
- package/dist/css/color-input.css +1 -1
- package/dist/css/coming-soon.css +1 -1
- package/dist/css/common.css +1 -1
- package/dist/css/components.css +1 -1
- package/dist/css/cropper.css +10 -6
- package/dist/css/datepicker.css +1 -1
- package/dist/css/default-avatar.css +1 -1
- package/dist/css/dialog.css +1 -1
- package/dist/css/dropdown-menu.css +1 -1
- package/dist/css/field.css +1 -1
- package/dist/css/filter-tabs.css +1 -1
- package/dist/css/flex.css +1 -1
- package/dist/css/floating.css +1 -1
- package/dist/css/footer.css +1 -1
- package/dist/css/form.css +1 -1
- package/dist/css/game-box.css +3 -3
- package/dist/css/game-carousel.css +1 -1
- package/dist/css/game-categories.css +1 -1
- package/dist/css/game-filter.css +1 -1
- package/dist/css/game-navigator.css +1 -1
- package/dist/css/game-providers.css +1 -1
- package/dist/css/game-search.css +1 -1
- package/dist/css/game-shell.css +3 -1
- package/dist/css/header.css +3 -3
- package/dist/css/help.css +1 -1
- package/dist/css/home-sections.css +1 -1
- package/dist/css/hovercard.css +1 -1
- package/dist/css/hstrip.css +1 -1
- package/dist/css/html-header.css +1 -1
- package/dist/css/image.css +1 -1
- package/dist/css/input.css +1 -1
- package/dist/css/label.css +1 -1
- package/dist/css/last-winners.css +1 -1
- package/dist/css/login.css +1 -1
- package/dist/css/mega-menu.css +3 -1
- package/dist/css/min-width-gate.css +1 -1
- package/dist/css/mobile-bottom-nav.css +1 -1
- package/dist/css/modal.css +8 -8
- package/dist/css/multiple-jackpots.css +3 -1
- package/dist/css/notifications-panel.css +2 -2
- package/dist/css/page.css +2 -2
- package/dist/css/popover.css +1 -1
- package/dist/css/post-viewer.css +1 -1
- package/dist/css/progress.css +1 -1
- package/dist/css/promotions-grid.css +3 -3
- package/dist/css/properties.css +1 -1
- package/dist/css/radio.css +1 -1
- package/dist/css/raffle.css +1 -1
- package/dist/css/rangepicker.css +1 -1
- package/dist/css/reset.css +2 -2
- package/dist/css/result.css +1 -1
- package/dist/css/select.css +1 -1
- package/dist/css/separator.css +1 -1
- package/dist/css/sheet.css +1 -1
- package/dist/css/signup.css +1 -1
- package/dist/css/skeleton.css +2 -2
- package/dist/css/slider.css +1 -1
- package/dist/css/spin.css +1 -1
- package/dist/css/stat-card.css +1 -1
- package/dist/css/sub-page-header.css +1 -1
- package/dist/css/svg-loader.css +1 -1
- package/dist/css/switch.css +1 -1
- package/dist/css/table.css +6 -4
- package/dist/css/tabs.css +1 -1
- package/dist/css/textarea.css +1 -1
- package/dist/css/toggle-group.css +1 -1
- package/dist/css/tooltip.css +1 -1
- package/dist/css/tournaments.css +8 -7
- package/dist/css/upload.css +1 -1
- package/dist/css/user-hub.css +2 -2
- package/dist/css/utilities.css +1 -1
- package/dist/css/vendor.css +4 -1
- package/dist/es/_bundled/@radix-ui/primitive/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-compose-refs/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-context/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-dialog/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-dismissable-layer/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-focus-guards/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-focus-scope/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-id/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-portal/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-presence/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-primitive/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-slot/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-use-callback-ref/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-use-controllable-state/dist/index.js +1 -1
- package/dist/es/_bundled/@radix-ui/react-use-effect-event/dist/index.js +1 -0
- package/dist/es/back-top/index.js +1 -1
- package/dist/es/blocks/auth-complete/index.js +1 -0
- package/dist/es/blocks/auth-page/index.js +1 -0
- package/dist/es/blocks/banner/index.js +1 -1
- package/dist/es/blocks/casino-featured/index.js +1 -1
- package/dist/es/blocks/game-box/index.js +1 -1
- package/dist/es/blocks/game-carousel/index.js +1 -1
- package/dist/es/blocks/game-providers/logos.js +1 -1
- package/dist/es/blocks/game-shell/useDrawerChrome.js +1 -1
- package/dist/es/blocks/header/index.js +1 -1
- package/dist/es/blocks/login/index.js +1 -0
- package/dist/es/blocks/mega-menu/index.js +1 -1
- package/dist/es/blocks/multiple-jackpots/index.js +1 -1
- package/dist/es/blocks/signup/index.js +1 -0
- package/dist/es/blocks/slider/index.js +1 -1
- package/dist/es/blocks/tournaments/index.js +1 -1
- package/dist/es/blocks/user-hub/bonus.js +1 -1
- package/dist/es/blocks/user-hub/cashier.js +1 -1
- package/dist/es/blocks/user-hub/history.js +1 -1
- package/dist/es/blocks/user-hub/profile.js +1 -1
- package/dist/es/blocks/user-hub/raffles.js +1 -1
- package/dist/es/blocks/user-hub/table.js +1 -1
- package/dist/es/context/ITDContext.js +1 -1
- package/dist/es/context/PortalDocumentContext.js +1 -1
- package/dist/es/context-menu/ContextMenu.js +1 -1
- package/dist/es/dialog/Dialog.js +1 -1
- package/dist/es/dropdown-menu/CheckIcon.js +1 -1
- package/dist/es/dropdown-menu/processChildren.js +1 -1
- package/dist/es/dropdown-menu/useMenuItemChrome.js +1 -1
- package/dist/es/dropdown-menu/useSubMenuRegistry.js +1 -1
- package/dist/es/floating/createFloatingTrigger.js +1 -1
- package/dist/es/helpers/phone/usePhoneCountry.js +1 -1
- package/dist/es/helpers/theme/createTheme.js +1 -1
- package/dist/es/helpers/theme/importShadcnTheme.js +1 -1
- package/dist/es/hooks/useFocusTrap.js +1 -1
- package/dist/es/hooks/useLoadMoreSentinel.js +1 -1
- package/dist/es/hooks/useOnESCKeyDown.js +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es/modal/container/ModalContainer.js +1 -1
- package/dist/es/modal/index.js +1 -1
- package/dist/es/page/blocks.js +1 -1
- package/dist/es/page/blocks.query.js +1 -1
- package/dist/es/page/editor/theme.js +1 -1
- package/dist/es/router/ITDLink.js +1 -1
- package/dist/es/router/context.js +1 -1
- package/dist/es/router/matchActive.js +1 -1
- package/dist/es/toast/index.js +1 -1
- package/dist/global.css +187 -155
- package/dist/index.d.ts +667 -186
- package/dist/types/blocks/auth-complete/index.d.ts +2 -0
- package/dist/types/blocks/auth-page/index.d.ts +2 -0
- package/dist/types/blocks/banner/index.d.ts +2 -0
- package/dist/types/blocks/box-title/index.d.ts +2 -0
- package/dist/types/blocks/casino-featured/index.d.ts +8 -0
- package/dist/types/blocks/default-avatar/index.d.ts +1 -0
- package/dist/types/blocks/featured-games/index.d.ts +2 -0
- package/dist/types/blocks/filter-tabs/index.d.ts +2 -0
- package/dist/types/blocks/footer/index.d.ts +2 -0
- package/dist/types/blocks/game-box/index.d.ts +21 -0
- package/dist/types/blocks/game-carousel/index.d.ts +2 -0
- package/dist/types/blocks/game-categories/index.d.ts +2 -0
- package/dist/types/blocks/game-filter/index.d.ts +2 -0
- package/dist/types/blocks/game-navigator/index.d.ts +2 -0
- package/dist/types/blocks/game-providers/index.d.ts +2 -0
- package/dist/types/blocks/game-search/index.d.ts +4 -0
- package/dist/types/blocks/game-shell/index.d.ts +2 -0
- package/dist/types/blocks/games-grid/index.d.ts +2 -0
- package/dist/types/blocks/header/index.d.ts +2 -0
- package/dist/types/blocks/help/index.d.ts +2 -0
- package/dist/types/blocks/last-winners/index.d.ts +2 -0
- package/dist/types/blocks/layout-boxes/index.d.ts +2 -0
- package/dist/types/blocks/login/index.d.ts +6 -0
- package/dist/types/blocks/mega-menu/index.d.ts +4 -0
- package/dist/types/blocks/min-width-gate/index.d.ts +2 -0
- package/dist/types/blocks/mobile-bottom-nav/index.d.ts +2 -0
- package/dist/types/blocks/multiple-jackpots/index.d.ts +2 -0
- package/dist/types/blocks/notifications/index.d.ts +2 -0
- package/dist/types/blocks/post-viewer/index.d.ts +2 -0
- package/dist/types/blocks/promotions-grid/index.d.ts +186 -0
- package/dist/types/blocks/raffle/index.d.ts +2 -0
- package/dist/types/blocks/signup/index.d.ts +2 -0
- package/dist/types/blocks/slider/index.d.ts +2 -0
- package/dist/types/blocks/slider-double/index.d.ts +2 -0
- package/dist/types/blocks/spacer/index.d.ts +36 -0
- package/dist/types/blocks/sub-page-header/index.d.ts +2 -0
- package/dist/types/blocks/tournaments/index.d.ts +2 -0
- package/dist/types/blocks/user-hub/index.d.ts +2 -0
- package/package.json +29 -35
- package/dist/cjs/_bundled/@radix-ui/react-use-escape-keydown/dist/index.js +0 -1
- package/dist/es/_bundled/@radix-ui/react-use-escape-keydown/dist/index.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as a,Fragment as i}from"react/jsx-runtime";import{useRef as n,useState as l,useEffect as t}from"react";import{Plus as r,Bell as o,EyeOff as s,Eye as d,LogOut as c}from"lucide-react";import m from"../../button/index.js";import{Avatar as h}from"../../avatar/index.js";import p from"../../select/index.js";import u,{useAmountMask as g}from"../../amount/index.js";import{useITD as b}from"../../context/ITDContext.js";import{GetPlatform as f}from"../../helpers/platform/index.js";import{PlatformTypes as v}from"../../helpers/classname/GetClassNameByPlatform.js";import N from"../../hooks/useOnESCKeyDown.js";import{SelectItem as k}from"../../select/SelectItem.js";const C=({locale:a})=>{const[i,n]=l("");return t(()=>{const e=()=>n((new Date).toLocaleTimeString(a));e();const i=setInterval(e,1e3);return()=>clearInterval(i)},[a]),e("span",{id:"inn-ticker",className:"itd-header-ticker",children:i})},y=({item:i})=>a("a",{href:i.href??"#",className:i.active?"active":void 0,onClick:e=>{i.href||e.preventDefault(),i.onClick?.()},children:[i.icon&&e("span",{className:"itd-header-nav-icon",children:i.icon}),e("span",{children:i.label})]}),x=({languages:a,language:i,onLanguageChange:n,compact:l})=>{const{theme:t}=b();return e(p,{variant:l&&"dark"===t?"filled":"default",size:l?"small":"medium",defaultValue:i,onChange:e=>n?.(e),"aria-label":"Dil",children:a.map(a=>e(k,{value:a.value,image:a.image,selectedLabel:l?a.label:void 0,children:l?a.label:a.fullLabel??a.label},a.value))})},z=({logo:r,nav:p=[],user:b,languages:f=[],language:v,onLanguageChange:k,languageLabel:z="Dil:",showClock:T=!0,locale:j="tr-TR",onLogin:B,onSignup:L,loginText:D="Giriş Yap",signupText:S="Kayıt Ol",onBonus:w,onDeposit:Y,bonusText:O="Bonus Talep",depositText:E="Para Yatır",onNotifications:I,onSignOut:P,signOutText:M="Çıkış Yap",profileMenu:G=[],id:K,className:R})=>{const{masked:V,toggle:q}=g(),A=n(null),[F,H]=l(!1),[J,Q]=l(!1),U=n([]),W=()=>{U.current.forEach(clearTimeout),U.current=[]};N(()=>{W(),Q(!1),H(!1)},A,{enabled:F}),t(()=>W,[]);const X=e("span",{className:"itd-header-sep","aria-hidden":!0});return a("header",{ref:A,id:K??"inn-header",className:"itd-header"+(R?" "+R:""),children:[a("div",{id:"inn-header-top",className:"itd-header-top",children:[e("a",{id:"inn-header-logo",className:"inn-header-logo itd-header-logo",href:"#",onClick:e=>e.preventDefault(),children:r}),a("div",{className:"itd-header-cluster",children:[a(i,b?{children:[w&&e(m,{size:"small",variant:"outline-accent",onClick:w,children:O}),Y&&e(m,{size:"small",variant:"default",onClick:Y,children:E})]}:{children:[e(m,{size:"small",variant:"outline-accent",onClick:B,children:D}),e(m,{size:"small",variant:"default",onClick:L,children:S})]}),f.length>0&&a(i,{children:[X,e("span",{id:"inn-language-select",className:"itd-header-lang",children:e(x,{languages:f,language:v,onLanguageChange:k,compact:!0})})]}),T&&a(i,{children:[X,e(C,{locale:j})]}),b&&a(i,{children:[X,a("span",{id:"inn-balance",className:"itd-header-balance",children:[e(u,{value:b.balance}),e(m,{variant:"ghost",className:"itd-header-eye","aria-label":V?"Bakiyeleri göster":"Bakiyeleri gizle",onClick:q,children:e(V?s:d,{size:15})})]}),X,a("button",{type:"button",className:"inn-mobile-notifications itd-header-bell","aria-label":"Bildirimler",onClick:I,children:[e(o,{size:16,fill:"currentColor"}),void 0!==b.notifications&&e("span",{className:"itd-header-bell-count",children:b.notifications})]}),a("div",{id:"inn-profile-popover",className:"itd-header-profile",onMouseEnter:()=>{W(),F?Q(!0):(H(!0),U.current.push(window.setTimeout(()=>Q(!0),10)))},onMouseLeave:()=>{W(),Q(!1),U.current.push(window.setTimeout(()=>H(!1),250))},children:[e("div",{id:"inn-profile-photo",className:"itd-header-avatar","data-open":J,children:e(h,{"aria-hidden":!0})}),e("span",{id:"inn-socket-status",className:"itd-header-dot","data-status":b.socketStatus??"connected",title:"Bağlı",children:e("span",{})}),a("div",{className:"inn-profile-popover-body itd-header-pop",style:{opacity:J?1:0,transform:J?"translateY(0)":"translateY(-10px)",transition:"opacity 250ms ease, transform 250ms ease",visibility:F?"visible":"hidden",pointerEvents:F?"auto":"none"},children:[a("div",{className:"inn-profile-popover-user itd-header-pop-user",children:[e("span",{className:"inn-profile-popover-user-photo itd-header-pop-photo",children:e(h,{"aria-hidden":!0})}),a("span",{className:"inn-profile-popover-user-info itd-header-pop-id",children:[e("span",{children:b.username}),b.country&&e("span",{children:b.country})]})]}),e("hr",{className:"itd-header-pop-sep"}),e("div",{className:"inn-profile-popover-menu inn-mobile-menu-items itd-header-pop-menu",children:G.map(e=>a(m,{variant:"ghost",size:"default",className:"inn-mobile-menu-item justify-start",onClick:e.onClick,children:[e.icon,e.label]},e.label))}),f.length>0&&a(i,{children:[e("hr",{className:"itd-header-pop-sep"}),a("div",{className:"inn-profile-popover-language itd-header-pop-lang",children:[e("span",{children:z}),e(x,{languages:f,language:v,onLanguageChange:k})]})]}),e("hr",{className:"itd-header-pop-sep"}),e("div",{className:"inn-profile-popover-sign-out itd-header-pop-out",children:a(m,{variant:"ghost",size:"default",className:"justify-start",onClick:P,children:[e(c,{size:16}),M]})})]})]})]})]})]}),p.length>0&&e("nav",{id:"inn-header-menu",className:"itd-header-menu",children:e("ul",{className:"itd-header-menu-list",children:p.map(a=>e("li",{className:"itd-header-menu-item",children:e(y,{item:a})},a.label))})})]})},T=({logo:n,user:l,onLogin:t,onSignup:s,loginText:d="Giriş Yap",signupText:c="Kayıt Ol",onDeposit:p,onNotifications:b,onProfile:f,id:v,className:N})=>{const{masked:k,toggle:C}=g();return e("header",{id:v??"inn-mobile-header",className:"itd-mobile-header"+(N?" "+N:""),children:a("div",{id:"inn-mobile-header-top",className:"itd-mobile-header-top",children:[e("a",{id:"inn-mobile-header-logo",className:"inn-mobile-header-logo itd-mobile-header-logo",href:"#",onClick:e=>e.preventDefault(),children:n}),e("div",{className:"itd-mobile-header-cluster",children:a(i,l?{children:[a("span",{className:"inn-mobile-balance itd-mobile-header-balance",children:[e("button",{type:"button",className:"itd-mobile-header-balance-amount","aria-label":k?"Bakiyeyi göster":"Bakiyeyi gizle",onClick:C,children:e(u,{value:l.balance})}),e(m,{size:"small",variant:"default","aria-label":"Para Yatır",onClick:p,children:e(r,{size:18})})]}),a("button",{type:"button",className:"inn-mobile-notifications itd-mobile-header-bell","aria-label":"Bildirimler",onClick:b,children:[e(o,{size:16,fill:"currentColor"}),void 0!==l.notifications&&e("span",{className:"itd-mobile-header-bell-count",children:l.notifications})]}),a("button",{type:"button",id:"inn-mobile-profile-photo",className:"itd-mobile-header-avatar","aria-label":"Profil",onClick:f,children:[e(h,{"aria-hidden":!0}),e("span",{id:"inn-socket-status",className:"itd-mobile-header-dot","data-status":l.socketStatus??"connected",title:"Bağlı",children:e("span",{})})]})]}:{children:[e(m,{variant:"custom",size:"medium",className:"itd-mobile-header-login",onClick:t,children:d}),e(m,{size:"medium",className:"itd-mobile-header-signup",onClick:s,children:c})]})})]})})},j=a=>{const i=f()===v.MOBILE;return e(i?T:z,{...a})};export{j as default};
|
|
1
|
+
import{jsx as e,jsxs as a,Fragment as i}from"react/jsx-runtime";import{useRef as n,useState as l,useEffect as t}from"react";import{Plus as r,Bell as o,EyeOff as s,Eye as d,LogOut as c}from"lucide-react";import m from"../../button/index.js";import{Avatar as h}from"../../avatar/index.js";import p from"../../select/index.js";import u,{useAmountMask as g}from"../../amount/index.js";import{useITD as b}from"../../context/ITDContext.js";import{GetPlatform as f}from"../../helpers/platform/index.js";import{PlatformTypes as v}from"../../helpers/classname/GetClassNameByPlatform.js";import N from"../../hooks/useOnESCKeyDown.js";import{SelectItem as k}from"../../select/SelectItem.js";const C=({locale:a})=>{const[i,n]=l("");return t(()=>{const e=()=>n((new Date).toLocaleTimeString(a));e();const i=setInterval(e,1e3);return()=>clearInterval(i)},[a]),e("span",{id:"inn-ticker",className:"itd-header-ticker",children:i})},y=({item:i})=>a("a",{href:i.href??"#",className:i.active?"active":void 0,onClick:e=>{i.href||e.preventDefault(),i.onClick?.()},children:[i.icon&&e("span",{className:"itd-header-nav-icon",children:i.icon}),e("span",{children:i.label})]}),x=({languages:a,language:i,onLanguageChange:n,compact:l})=>{const{theme:t}=b();return e(p,{variant:l&&"dark"===t?"filled":"default",size:l?"small":"medium",defaultValue:i,onChange:e=>n?.(e),"aria-label":"Dil",children:a.map(a=>e(k,{value:a.value,image:a.image,selectedLabel:l?a.label:void 0,children:l?a.label:a.fullLabel??a.label},a.value))})},z=({logo:r,nav:p=[],user:b,languages:f=[],language:v,onLanguageChange:k,languageLabel:z="Dil:",showClock:T=!0,locale:j="tr-TR",onLogin:B,onSignup:L,loginText:D="Giriş Yap",signupText:S="Kayıt Ol",onBonus:w,onDeposit:Y,bonusText:O="Bonus Talep",depositText:E="Para Yatır",onNotifications:I,onSignOut:P,signOutText:M="Çıkış Yap",profileMenu:G=[],id:K,className:R})=>{const{masked:V,toggle:q}=g(),A=n(null),[F,H]=l(!1),[J,Q]=l(!1),U=n([]),W=()=>{U.current.forEach(clearTimeout),U.current=[]};N(()=>{W(),Q(!1),H(!1)},A,{enabled:F}),t(()=>W,[]);const X=e("span",{className:"itd-header-sep header-separator","aria-hidden":!0});return a("header",{ref:A,id:K??"inn-header",className:"itd-header"+(R?" "+R:""),children:[a("div",{id:"inn-header-top",className:"itd-header-top",children:[e("a",{id:"inn-header-logo",className:"inn-header-logo itd-header-logo",href:"#",onClick:e=>e.preventDefault(),children:r}),a("div",{className:"itd-header-cluster",children:[a(i,b?{children:[w&&e(m,{size:"small",variant:"outline-accent",onClick:w,children:O}),Y&&e(m,{size:"small",variant:"default",onClick:Y,children:E})]}:{children:[e(m,{size:"small",variant:"outline-accent",onClick:B,children:D}),e(m,{size:"small",variant:"default",onClick:L,children:S})]}),f.length>0&&a(i,{children:[X,e("span",{id:"inn-language-select",className:"itd-header-lang",children:e(x,{languages:f,language:v,onLanguageChange:k,compact:!0})})]}),T&&a(i,{children:[X,e(C,{locale:j})]}),b&&a(i,{children:[X,a("span",{id:"inn-balance",className:"itd-header-balance",children:[e(u,{value:b.balance}),e(m,{variant:"ghost",className:"itd-header-eye","aria-label":V?"Bakiyeleri göster":"Bakiyeleri gizle",onClick:q,children:e(V?s:d,{size:15})})]}),X,a("button",{type:"button",className:"inn-mobile-notifications itd-header-bell","aria-label":"Bildirimler",onClick:I,children:[e(o,{size:16,fill:"currentColor"}),void 0!==b.notifications&&e("span",{className:"itd-header-bell-count",children:b.notifications})]}),a("div",{id:"inn-profile-popover",className:"itd-header-profile",onMouseEnter:()=>{W(),F?Q(!0):(H(!0),U.current.push(window.setTimeout(()=>Q(!0),10)))},onMouseLeave:()=>{W(),Q(!1),U.current.push(window.setTimeout(()=>H(!1),250))},children:[e("div",{id:"inn-profile-photo",className:"itd-header-avatar","data-open":J,children:e(h,{"aria-hidden":!0})}),e("span",{id:"inn-socket-status",className:"itd-header-dot","data-status":b.socketStatus??"connected",title:"Bağlı",children:e("span",{})}),a("div",{className:"inn-profile-popover-body itd-header-pop",style:{opacity:J?1:0,transform:J?"translateY(0)":"translateY(-10px)",transition:"opacity 250ms ease, transform 250ms ease",visibility:F?"visible":"hidden",pointerEvents:F?"auto":"none"},children:[a("div",{className:"inn-profile-popover-user itd-header-pop-user",children:[e("span",{className:"inn-profile-popover-user-photo itd-header-pop-photo",children:e(h,{"aria-hidden":!0})}),a("span",{className:"inn-profile-popover-user-info itd-header-pop-id",children:[e("span",{children:b.username}),b.country&&e("span",{children:b.country})]})]}),e("hr",{className:"itd-header-pop-sep"}),e("div",{className:"inn-profile-popover-menu inn-mobile-menu-items itd-header-pop-menu",children:G.map(e=>a(m,{variant:"ghost",size:"default",className:"inn-mobile-menu-item justify-start",onClick:e.onClick,children:[e.icon,e.label]},e.label))}),f.length>0&&a(i,{children:[e("hr",{className:"itd-header-pop-sep"}),a("div",{className:"inn-profile-popover-language itd-header-pop-lang",children:[e("span",{children:z}),e(x,{languages:f,language:v,onLanguageChange:k})]})]}),e("hr",{className:"itd-header-pop-sep"}),e("div",{className:"inn-profile-popover-sign-out itd-header-pop-out",children:a(m,{variant:"ghost",size:"default",className:"justify-start",onClick:P,children:[e(c,{size:16}),M]})})]})]})]})]})]}),p.length>0&&e("nav",{id:"inn-header-menu",className:"itd-header-menu",children:e("ul",{className:"itd-header-menu-list header-menu-list",children:p.map(a=>e("li",{className:"itd-header-menu-item header-menu-item",children:e(y,{item:a})},a.label))})})]})},T=({logo:n,user:l,onLogin:t,onSignup:s,loginText:d="Giriş Yap",signupText:c="Kayıt Ol",onDeposit:p,onNotifications:b,onProfile:f,id:v,className:N})=>{const{masked:k,toggle:C}=g();return e("header",{id:v??"inn-mobile-header",className:"itd-mobile-header"+(N?" "+N:""),children:a("div",{id:"inn-mobile-header-top",className:"itd-mobile-header-top",children:[e("a",{id:"inn-mobile-header-logo",className:"inn-mobile-header-logo itd-mobile-header-logo",href:"#",onClick:e=>e.preventDefault(),children:n}),e("div",{className:"itd-mobile-header-cluster",children:a(i,l?{children:[a("span",{className:"inn-mobile-balance itd-mobile-header-balance",children:[e("button",{type:"button",className:"itd-mobile-header-balance-amount","aria-label":k?"Bakiyeyi göster":"Bakiyeyi gizle",onClick:C,children:e(u,{value:l.balance})}),e(m,{size:"small",variant:"default","aria-label":"Para Yatır",onClick:p,children:e(r,{size:18})})]}),a("button",{type:"button",className:"inn-mobile-notifications itd-mobile-header-bell","aria-label":"Bildirimler",onClick:b,children:[e(o,{size:16,fill:"currentColor"}),void 0!==l.notifications&&e("span",{className:"itd-mobile-header-bell-count",children:l.notifications})]}),a("button",{type:"button",id:"inn-mobile-profile-photo",className:"itd-mobile-header-avatar","aria-label":"Profil",onClick:f,children:[e(h,{"aria-hidden":!0}),e("span",{id:"inn-socket-status",className:"itd-mobile-header-dot","data-status":l.socketStatus??"connected",title:"Bağlı",children:e("span",{})})]})]}:{children:[e(m,{variant:"custom",size:"medium",className:"itd-mobile-header-login",onClick:t,children:d}),e(m,{size:"medium",className:"itd-mobile-header-signup",onClick:s,children:c})]})})]})})},j=a=>{const i=f()===v.MOBILE;return e(i?T:z,{...a})};export{j as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as i,Fragment as n}from"react/jsx-runtime";import{forwardRef as l,useState as r,useRef as t,useEffect as a,useMemo as o}from"react";import s from"../../form/index.js";import{Field as d}from"../../field/index.js";import c from"../../input/index.js";import m from"../../code-input/index.js";import h from"../../checkbox/index.js";import u from"../../button/index.js";import{Tabs as p}from"../../tabs/Tabs.js";import{TabsList as g}from"../../tabs/TabsList.js";import{TabsTrigger as f}from"../../tabs/TabsTrigger.js";import"../../tabs/TabsContent.js";import{InputTypes as b}from"../../types/InputProps.js";import{usePhoneCountry as v}from"../../helpers/phone/usePhoneCountry.js";import{isPhoneComplete as C,toE164 as w}from"../../helpers/phone/index.js";import k from"../../form/group/Group.js";import y from"../../form/control/Control.js";const N=l(({identifier:l="username",identifiers:N,onIdentifierChange:x,country:j,logo:z,banner:S,onClose:I,closeLabel:M="Kapat",channel:P=null,allowPassword:T=!1,step:D="credentials",username:H="",cooldownUntil:L=null,loading:B=!1,codeLength:A=6,codeError:E,identifierIcon:V,passwordIcon:q,alternates:F,onAlternate:R,variant:W="form",onPasskey:G,onChangeMethod:K,onCreateAccount:O,texts:U,onSubmitCredentials:X,onSubmitCode:J,onResend:Q,onChangeIdentifier:Y,onForgotPassword:Z,onContactSupport:$,className:_=""},ee)=>{const ie=!!N&&N.length>1,[ne,le]=r(()=>ie&&!N.includes(l)?N[0]:l),re=ie?ne:l,te=v("phone"===re?j:null),ae=t(null),[oe,se]=r(!1),[de,ce]=r(""),[me,he]=r(""),[ue,pe]=r(""),ge=(e=>{const i=e?new Date(e).getTime():0,[n,l]=r(()=>Date.now());a(()=>{if(!i||i<=Date.now())return;l(Date.now());const e=setInterval(()=>l(Date.now()),1e3);return()=>clearInterval(e)},[i]);const t=Math.max(0,i-n),o=Math.ceil(t/1e3),s=e=>String(e).padStart(2,"0");return{active:t>0,label:s(Math.floor(o/60))+":"+s(o%60)}})(L),fe="code"===D,be="link-sent"===D,ve="passkey"===W&&!fe&&!be,Ce=T&&!!H&&!fe&&!be,we=!fe&&!be&&(null===P||T),ke="phone"===re;a(()=>{fe||ce("")},[fe]),a(()=>{E&&ae.current?.setError?.(E)},[E]);const ye=fe?U.submitVerify??U.submit:we?U.submit:U.submitContinue??U.submit,Ne=!!Ce||(ke?C(te,me):me.trim().length>0),xe=fe?de.length!==A||B:!oe||!Ne||we&&0===ue.length||B,je=o(()=>U.welcomeBack&&H?U.welcomeBack.replace("{username}",H).replace("{{username}}",H):null,[U.welcomeBack,H]),ze=U.identifierPlaceholders?.[re]??U.identifier,Se=e(d,ke?{name:"username",rules:[{required:!0},{validator:e=>C(te,String(e??""))}],children:e(c,{type:b.TEL,size:"x-large",inputMode:"numeric",autoComplete:"tel-national",mask:te?.mask??null,placeholder:ze,onChange:e=>he(String(e??"")),addonBefore:V,prefix:e("span",{className:"itd-login-dial",children:te?.code})})}:{name:"username",rules:[{required:!0}],children:e(c,{type:"email"===re?b.EMAIL:b.TEXT,size:"x-large",autoComplete:"email"===re?"email":"username",placeholder:ze,addonBefore:V,onChange:e=>he(String(e??""))})},re),Ie=F&&F.length>0&&!fe&&!be?i(n,{children:[e("div",{className:"itd-login-or",role:"separator",children:U.orDivider?e("span",{children:U.orDivider}):null}),e("div",{className:"itd-login-alternates",children:F.map(e=>i(u,{variant:"solid",size:"large",disabled:B,onClick:()=>R?.(e.id),children:[e.icon,e.label]},e.id))})]}):null;return i("div",{className:"itd-login"+(_?" "+_:""),children:[z||I?i("div",{className:"itd-login-topbar",children:[e("span",{className:"itd-login-logo",children:z}),I?e(u,{variant:"ghost",size:"icon",className:"itd-login-close","aria-label":M,onClick:I,children:e("svg",{viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",children:e("path",{d:"M18 6 6 18M6 6l12 12",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}):null]}):null,S?e("div",{className:"itd-login-banner",children:S}):null,i("div",{className:"itd-login-body"+(fe?" itd-login-verify":""),children:[i("div",{className:"itd-login-intro",children:[fe||be?je?e("span",{className:"itd-login-eyebrow",children:je}):null:U.description?e("span",{className:"itd-login-eyebrow",children:U.description}):null,e("span",{className:"itd-login-title",children:fe?U.titleVerify??U.title:be?U.titleLinkSent??U.title:U.title})]}),e("div",{className:"itd-login-rule"}),fe&&U.codeHint?e("p",{className:"itd-login-hint",children:U.codeHint}):null,be&&U.linkSentHint?e("p",{className:"itd-login-hint",children:U.linkSentHint}):null,ve?i(n,{children:[U.passkeyHint?e("p",{className:"itd-login-hint",children:U.passkeyHint}):null,e(u,{type:"button",size:"x-large",loading:B,onClick:G,style:{width:"100%"},children:U.passkeyCta??U.submit}),Ie]}):be?null:fe?i("div",{className:"itd-login-code",children:[e(m,{ref:ae,size:"x-large",length:A,value:de,onChange:ce,autoFocus:!0,"aria-label":U.titleVerify??U.title}),e(u,{type:"button",size:"x-large",loading:B,disabled:xe,onClick:()=>{de.length!==A||B||J?.(de)},style:{width:"100%"},children:ye})]}):i(n,{children:[ie&&!Ce?e(p,{value:re,onValueChange:e=>(e=>{e!==ne&&(le(e),he(""),x?.(e))})(e),variant:"filled",className:"itd-login-tabs",children:e(g,{"aria-label":U.title,children:N.map(i=>e(f,{value:i,children:U.identifierTabs?.[i]??i},i))})}):null,i(s,{name:"sign-in",ref:ee,onFinish:e=>{const i=String(e.username??(Ce?H:""));X?.({username:ke&&!Ce?w(te,i):i,...we?{password:String(e.password??"")}:{},remember:!!e.remember})},onValidated:se,children:[i(k,{gap:12,children:[Ce?i("div",{className:"itd-login-identity",children:[e("span",{className:"itd-login-identity-value",children:H}),U.changeIdentifier?e(u,{variant:"ghost",size:"small",onClick:Y,disabled:B,children:U.changeIdentifier}):null]}):Se,we?e(d,{name:"password",rules:[{required:!0}],children:e(c,{type:b.PASSWORD,size:"x-large",autoComplete:"current-password",placeholder:U.password,addonBefore:q,onChange:e=>pe(String(e??""))})}):null,U.rememberMe?e(d,{name:"remember",children:e(h,{children:U.rememberMe})}):null]}),e(y,{children:e(u,{type:"submit",size:"x-large",loading:B,disabled:xe,style:{width:"100%"},children:ye})})]}),Ie]}),e("div",{className:"itd-login-actions",children:fe||be?i(n,{children:[ge.active?e("span",{className:"itd-login-countdown",children:ge.label}):U.resendCode?e(u,{variant:"filled",size:"medium",onClick:Q,disabled:B,children:U.resendCode}):null,be&&U.changeMethod?e(u,{variant:"ghost",size:"medium",onClick:K,disabled:B,children:U.changeMethod}):null,!be&&U.changeIdentifier?e(u,{variant:"ghost",size:"medium",onClick:Y,disabled:B,children:U.changeIdentifier}):null]}):!ve&&U.forgotPassword?e(u,{variant:"ghost",size:"medium",onClick:Z,children:U.forgotPassword}):null}),!U.newHere||!U.createAccount||fe||be||Ce||ve?null:i("div",{className:"itd-login-footer",children:[e("span",{className:"itd-login-footer-note",children:U.newHere}),e(u,{variant:"ghost",size:"medium",onClick:O,disabled:B,children:U.createAccount})]}),U.support?e("div",{className:"itd-login-support",children:e(u,{variant:"solid",size:"large",onClick:$,style:{width:"100%"},children:U.support})}):null]})]})});N.displayName="LoginPanel";export{N as LoginPanel,N as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
1
|
+
import{jsx as e,jsxs as n,Fragment as i}from"react/jsx-runtime";import{useState as a}from"react";import{ChevronDown as m,ChevronRight as l}from"lucide-react";import t from"../../select/index.js";import{SelectItem as c}from"../../select/SelectItem.js";const d=({icon:n})=>n?e("span",{className:"itd-mega-menu-icon inn-mega-menu-icon inn-mobile-mega-menu-item-icon",children:n}):null,u=({link:a,className:m,trailing:l})=>{const t=n(i,{children:[e(d,{icon:a.icon}),e("span",{className:"itd-mega-menu-label inn-mega-menu-label",children:a.label}),null!=a.badge&&e("span",{className:"itd-mega-menu-badge inn-mega-menu-badge",children:a.badge}),l]}),c={className:(m+(a.active?" is-active":"")).trim(),"data-active":a.active?"true":void 0};return a.href?e("a",{...c,href:a.href,onClick:a.onClick,children:t}):e("button",{type:"button",...c,onClick:a.onClick,children:t})},r=({entries:i=[],className:d=""})=>{const[r,s]=a(()=>new Set(i.filter(e=>"accordion"===e.kind&&e.defaultOpen).map(e=>e.id)));return e("nav",{className:("itd-mega-menu inn-mega-menu "+d).trim(),"aria-label":"Menü",children:i.map(i=>{if("accordion"===i.kind){const a=r.has(i.id);return n("div",{className:"itd-mega-menu-item itd-mega-menu-item--accordion inn-mega-menu-item inn-mobile-mega-menu-group","data-open":a?"true":"false",children:[n("div",{className:"itd-mega-menu-head inn-mega-menu-item-head inn-mobile-mega-menu-item",children:[e(u,{link:{label:i.label,icon:i.icon,href:i.href,onClick:i.onClick,active:i.active},className:"itd-mega-menu-head-main inn-mega-menu-item-link"}),e("button",{type:"button",className:"itd-mega-menu-toggle inn-mega-menu-item-toggle","aria-expanded":a,"aria-label":a?"Kapat":"Aç",onClick:()=>{return e=i.id,s(n=>{const i=new Set(n);return i.has(e)?i.delete(e):i.add(e),i});var e},children:e("span",{className:"itd-mega-menu-toggle-icon","aria-hidden":!0,children:e(m,{})})})]}),e("div",{className:"itd-mega-menu-collapse inn-mega-menu-sub",children:e("div",{className:"itd-mega-menu-collapse-inner",children:i.items.map(n=>e(u,{link:n,className:"itd-mega-menu-subitem inn-mega-menu-sub-item inn-mobile-mega-menu-sub-menu-item"},n.id))})})]},i.id)}return"group"===i.kind?e("div",{className:"itd-mega-menu-item itd-mega-menu-item--group inn-mega-menu-item inn-mega-menu-group inn-mobile-mega-menu-group",children:i.items.map(n=>e(u,{link:n,className:"itd-mega-menu-groupitem inn-mega-menu-group-item inn-mobile-mega-menu-sub-menu-item"},n.id))},i.id):"select"===i.kind?e("div",{className:"itd-mega-menu-item itd-mega-menu-item--select inn-mega-menu-item",children:e(t,{size:"large",className:"itd-mega-menu-select"+(i.arrowWell?" itd-mega-menu-select--well":""),defaultValue:i.defaultValue,onChange:e=>i.onChange?.(e),"aria-label":i.ariaLabel,children:i.options.map(n=>e(c,{value:n.value,image:n.image,children:n.label},n.value))})},i.id):e("div",{className:"itd-mega-menu-item itd-mega-menu-item--link inn-mega-menu-item inn-mobile-mega-menu-group",children:e(u,{link:{label:i.label,icon:i.icon,href:i.href,onClick:i.onClick,active:i.active,badge:i.badge},className:"itd-mega-menu-link inn-mega-menu-link inn-mobile-mega-menu-item",trailing:e("span",{className:"itd-mega-menu-chevron inn-mega-menu-chevron","aria-hidden":!0,children:e(l,{})})})},i.id)})})};export{r as MegaMenu,r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a,jsxs as t,Fragment as e}from"react/jsx-runtime";import{useMemo as n,useState as i,useRef as o,useEffect as s}from"react";import l from"../../_bundled/embla-carousel-react/esm/embla-carousel-react.esm.js";import r from"../../_bundled/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js";import{Gamepad2 as c,ChevronUp as m,ChevronDown as p,Trophy as d,Medal as u,Calendar as k,User as j}from"lucide-react";import h from"../../button/index.js";import b from"../../image/index.js";import N from"../../skeleton/index.js";import{useModal as g}from"../../modal/index.js";import{useModalContent as w}from"../../modal/useModalContent.js";import f from"../game-box/index.js";import{GetClassNameByPlatform as x,PlatformTypes as v}from"../../helpers/classname/GetClassNameByPlatform.js";import{GetPlatform as y}from"../../helpers/platform/index.js";import
|
|
1
|
+
import{jsx as a,jsxs as t,Fragment as e}from"react/jsx-runtime";import{useMemo as n,useState as i,useRef as o,useEffect as s}from"react";import l from"../../_bundled/embla-carousel-react/esm/embla-carousel-react.esm.js";import r from"../../_bundled/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js";import{Gamepad2 as c,ChevronUp as m,ChevronDown as p,Trophy as d,Medal as u,Calendar as k,User as j}from"lucide-react";import h from"../../button/index.js";import b from"../../image/index.js";import N from"../../skeleton/index.js";import{useModal as g}from"../../modal/index.js";import{useModalContent as w}from"../../modal/useModalContent.js";import f from"../game-box/index.js";import{GetClassNameByPlatform as x,PlatformTypes as v}from"../../helpers/classname/GetClassNameByPlatform.js";import{GetPlatform as y}from"../../helpers/platform/index.js";import C from"../embla/useEmblaState.js";import W,{TierItem as O}from"./TierCarousel.js";const B=a=>new Intl.NumberFormat("tr-TR",{style:"currency",currency:"TRY",minimumFractionDigits:2,maximumFractionDigits:2}).format(a),A=({amount:t,format:e,className:n})=>{const l=(a=>{const[t,e]=i(0),n=o(0);return s(()=>{const t=performance.now(),i=o=>{const s=Math.min((o-t)/750,1);e(a*s),s<1&&(n.current=requestAnimationFrame(i))};return n.current=requestAnimationFrame(i),()=>cancelAnimationFrame(n.current)},[a]),t})(t);return a("span",{className:n,children:e(l)})},z=({stats:e,format:n,labels:i})=>{const o=(e,i,o)=>t("div",{className:"itd-jackpot-win-box",children:[t("span",{className:"itd-jackpot-win-box-title",children:[e,i]}),a(A,{amount:o?.amount??0,format:n,className:"itd-jackpot-win-box-amount"}),t("span",{className:"itd-jackpot-win-box-meta",children:[t("span",{children:[a(k,{"aria-hidden":!0}),o?.date??"--/--/---- 00:00"]}),t("span",{children:[a(j,{"aria-hidden":!0}),o?.username??"--"]})]})]});return t("div",{className:"itd-jackpot-winners-modal inn-jackpot-winners-modal",children:[o(a(u,{"aria-hidden":!0}),i?.maxWin??"Max Win",e?.maxWin),a("hr",{className:"itd-jackpot-winners-separator"}),o(a(d,{"aria-hidden":!0}),i?.lastWin??"Last Win",e?.lastWin),t("div",{className:"itd-jackpot-total-wins",children:[(i?.totalWins??"Total Wins")+":"," ",a("b",{children:e?.totalWins??0})]})]})},F=({games:t,onOpen:e})=>{const{hideCurrentModal:n}=w();return a("div",{className:"itd-jackpot-games-modal",children:t.map(t=>a(f,{slug:t.slug,image:t.image,name:t.name,background:!1,outline:!1,ratio:"440/310",onPlay:a=>{n?.(),e(a)}},t.id))})},M=({id:i,jackpots:o,loading:s,wordmark:u,texture:k,showWinners:j=!0,showGames:w=!0,autoplay:f=4e3,formatAmount:M=B,onGameOpen:P,labels:T,className:J})=>{const L=x,{showModal:H}=g(),G=n(()=>({axis:"y"}),[]),I=n(()=>!1===f?[]:[r({delay:f})],[f]),[S,q]=l(G,I),{selected:D,canPrev:E,canNext:K}=C(q),R=o??[],_=R[D]??R[0],U=a=>{q&&(q.plugins().autoplay?.stop(),"prev"===a?q.scrollPrev():q.scrollNext())},Y=()=>{const t=_?.games??[];H({title:T?.gamesTitle??"Jackpot Oyunları",className:"jackpot-games-modal",width:y()===v.MOBILE?"100%":"61.875rem",showCloseButton:!0,showOkButton:!1,showCancelButton:!1,content:a(F,{games:t,onOpen:a=>P?.(a)})})},$=e=>j||w?t("span",{className:"itd-jackpot-tier-buttons "+L("inn-multiple-jackpots-carousel-multiple-tier-buttons"),children:[j&&a(h,{size:"icon",variant:"solid",className:"itd-jackpot-round itd-jackpot-round--xs "+L("inn-multiple-jackpots-carousel-button")+" "+L("inn-multiple-jackpots-carousel-button--winners"),"aria-label":T?.winners??"Kazananlar",onClick:()=>(t=>{H({className:"itd-jackpot-winners-host jackpot-winners-modal",width:"25rem",contentPadding:"0",showCloseButton:!0,showOkButton:!1,showCancelButton:!1,content:a(z,{stats:t,format:M,labels:T})})})(e),children:a(d,{})}),w&&a(h,{size:"icon",variant:"solid",className:"itd-jackpot-round itd-jackpot-round--xs itd-jackpot-tier-games "+L("inn-multiple-jackpots-carousel-button")+" "+L("inn-multiple-jackpots-carousel-button--games"),"aria-label":T?.games??"Jackpot Oyunları",onClick:Y,children:a(c,{})})]}):null,Q=a=>a.name.toUpperCase()+(T?.tierSuffix??" JACKPOT"),V=k?{"--itd-jackpot-texture":`url("${k}")`}:void 0;return a("div",{id:i??L("inn-multiple-jackpots-component"),className:("itd-jackpots "+(J??"")).trim(),style:V,children:s?t("div",{className:"itd-jackpot-loading",children:[a(N,{height:"5rem",width:"16.3125rem",count:1}),a(N,{height:"5rem",width:"16.3125rem",count:1})]}):0===R.length?a("div",{className:"itd-jackpot-empty "+L("inn-multiple-jackpots-not-found"),children:a("span",{children:T?.empty??"Jackpot bulunamadı!"})}):t("section",{className:"itd-jackpot-carousel "+L("inn-multiple-jackpots-carousel"),children:[a("div",{className:"itd-jackpot-viewport "+L("inn-multiple-jackpots-carousel-viewport"),ref:S,children:a("div",{className:"itd-jackpot-container "+L("inn-multiple-jackpots-carousel-container"),children:R.map(e=>{const n=1===e.tiers.length;return t("div",{className:"itd-jackpot-slide "+L("inn-multiple-jackpots-carousel-slide"),children:[t("span",{className:"itd-jackpot-brand "+L("inn-multiple-jackpots-carousel-title-and-provider"),children:[null!=e.providerLogo&&a(b,{className:L("inn-multiple-jackpots-carousel-provider-icon"),src:e.providerLogo,alt:e.name,brokenWidth:66,brokenHeight:33}),null!=u&&a(b,{className:L("inn-multiple-jackpots-carousel-jackpot-text"),src:u,alt:"jackpot",brokenWidth:48,brokenHeight:12})]}),a("span",{className:"itd-jackpot-separator "+L("inn-multiple-jackpots-carousel-separator")}),a("span",{className:"itd-jackpot-art",children:null!=e.gameArt&&a(b,{className:L("inn-multiple-jackpots-carousel-jackpot-icon"),src:e.gameArt,alt:e.name,brokenWidth:55,brokenHeight:55})}),a("span",{className:"itd-jackpot-spacer "+L("inn-multiple-jackpots-carousel-spacer")}),n?t("span",{className:"itd-jackpot-single "+L("inn-multiple-jackpots-carousel-single-tier"),children:[a("span",{className:"itd-jackpot-tier-name "+L("inn-multiple-jackpots-carousel-single-tier-name"),children:Q(e.tiers[0])}),a(A,{amount:e.tiers[0].amount,format:M,className:"itd-jackpot-single-amount "+L("inn-multiple-jackpots-carousel-single-tier-amount")}),$(e.tiers[0].stats)]}):a(W,{children:e.tiers.map(e=>a(O,{itemId:e.id,children:t("span",{className:"itd-jackpot-tier "+L("inn-multiple-jackpots-carousel-multiple-tier"),children:[null!=e.symbol&&a(b,{className:"itd-jackpot-tier-symbol "+L("inn-multiple-jackpots-carousel-multiple-tier-content-tier-image"),src:e.symbol,alt:e.name,brokenWidth:36,brokenHeight:36}),t("span",{className:"itd-jackpot-tier-text "+L("inn-multiple-jackpots-carousel-multiple-tier-content"),children:[a("span",{className:"itd-jackpot-tier-name "+L("inn-multiple-jackpots-carousel-multiple-tier-content-name"),children:Q(e)}),a(A,{amount:e.amount,format:M,className:"itd-jackpot-tier-amount "+L("inn-multiple-jackpots-carousel-multiple-tier-content-amount")+" "+e.name.toLowerCase()})]}),$(e.stats)]})},e.id))}),a("span",{className:"itd-jackpot-spacer "+L("inn-multiple-jackpots-carousel-spacer")})]},e.id)})})}),t("span",{className:"itd-jackpot-controls "+L("inn-multiple-jackpots-carousel-controls"),children:[w&&t(e,{children:[a(h,{size:"icon",variant:"solid",className:"itd-jackpot-round "+L("inn-multiple-jackpots-carousel-controls-games-button"),"aria-label":T?.games??"Jackpot Oyunları",onClick:Y,children:a(c,{})}),a("span",{className:"itd-jackpot-separator itd-jackpot-separator--controls"})]}),t("span",{className:"itd-jackpot-arrows "+L("inn-multiple-jackpots-carousel-buttons"),children:[a(h,{size:"icon",variant:"solid",className:"itd-jackpot-round "+L("inn-multiple-jackpots-carousel-button--prev"),"aria-label":T?.prev??"Önceki jackpot",disabled:!E,onClick:()=>U("prev"),children:a(m,{})}),a(h,{size:"icon",variant:"solid",className:"itd-jackpot-round "+L("inn-multiple-jackpots-carousel-button--next"),"aria-label":T?.next??"Sonraki jackpot",disabled:!K,onClick:()=>U("next"),children:a(p,{})})]})]})]})})};export{M as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as n,Fragment as i}from"react/jsx-runtime";import{forwardRef as l,useRef as a,useState as t,useMemo as r,useEffect as s}from"react";import o from"../../form/index.js";import{Field as d}from"../../field/index.js";import c from"../../input/index.js";import m from"../../code-input/index.js";import u from"../../checkbox/index.js";import p from"../../button/index.js";import g from"../../datepicker/index.js";import h from"../../select/index.js";import{InputTypes as f}from"../../types/InputProps.js";import{usePhoneCountry as v}from"../../helpers/phone/usePhoneCountry.js";import{isPhoneComplete as b,toE164 as N}from"../../helpers/phone/index.js";import y from"../../form/control/Control.js";import{SelectItem as C}from"../../select/SelectItem.js";const x={phone:"identity",email:"identity",username:"credentials",password:"credentials",text:"profile",date:"profile",select:"profile",consent:"profile"},w=["identity","verify","credentials","profile"],k=e=>e.step??x[e.kind],S=(e,n)=>w.filter(i=>"verify"===i?n:e.some(e=>k(e)===i)),z=l(({fields:l,layout:x="single",wide:w=!1,verify:z=!1,verificationTiming:j="post_signup",step:I,completedSteps:B=[],country:D,logo:q,banner:A,onClose:L,closeLabel:M="Kapat",loading:T=!1,codeLength:H=6,cooldownUntil:P=null,codeError:V,maskedIdentity:E,suggestedUsername:F,texts:_,onSubmitStep:R,onSubmit:W,onVerifyCode:O,onResend:U,onEditIdentity:K,onSuggestUsername:G,onSignIn:J,className:Q=""},X)=>{const Y=v(D),Z=a(null),[$,ee]=t(!1),[ne,ie]=t(""),[le,ae]=t({}),te=a({}),[,re]=t(0),se=(e=>{const n=e?new Date(e).getTime():0,[i,l]=t(()=>Date.now());s(()=>{if(!n||n<=Date.now())return;l(Date.now());const e=setInterval(()=>l(Date.now()),1e3);return()=>clearInterval(e)},[n]);const a=Math.max(0,n-i),r=Math.ceil(a/1e3),o=e=>String(e).padStart(2,"0");return{active:a>0,label:o(Math.floor(r/60))+":"+o(r%60)}})(P),oe=r(()=>S(l,z),[l,z]),de="steps"===x,ce=de?I??oe[0]:"identity",me=de&&"verify"===ce,ue=!de&&z&&"in_form"===j;s(()=>{V&&Z.current?.setError?.(V)},[V]);const pe=r(()=>de?l.filter(e=>k(e)===ce):l,[l,de,ce]),ge=e=>n=>{te.current[e]=String(n??""),re(e=>e+1)},he=pe.every(e=>{if(!e.required||e.readonly||e.collapsed&&!le[e.name])return!0;const n=te.current[e.name]??"";return"phone"===e.kind?b(Y,n):"consent"===e.kind?"true"===n:"password"===e.kind&&e.confirm?n.length>0&&te.current[e.name+"_confirm"]===n:n.length>0}),fe=me?ne.length!==H||T:!$||!he||!!ue&&ne.length!==H||T,ve=de&&oe.length>1?e("ol",{className:"itd-signup-steps",children:oe.map((i,l)=>{const a=B.includes(i),t=i===ce;return n("li",{className:"itd-signup-step"+(t?" itd-signup-step-active":"")+(a?" itd-signup-step-done":""),"aria-current":t?"step":void 0,children:[e("span",{className:"itd-signup-step-mark",children:a?"✓":l+1}),_.stepLabels?.[i]??i]},i)})}):null,be=de?_.stepTitles?.[ce]:null;return n("div",{className:"itd-login itd-signup"+(!de&&w?" itd-signup-wide":"")+(Q?" "+Q:""),children:[q||L?n("div",{className:"itd-login-topbar",children:[e("span",{className:"itd-login-logo",children:q}),L?e(p,{variant:"ghost",size:"icon",className:"itd-login-close","aria-label":M,onClick:L,children:e("svg",{viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",children:e("path",{d:"M18 6 6 18M6 6l12 12",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}):null]}):null,A?e("div",{className:"itd-login-banner",children:A}):null,n("div",{className:"itd-login-body",children:[n("div",{className:"itd-login-intro",children:[_.description?e("span",{className:"itd-login-eyebrow",children:_.description}):null,e("span",{className:"itd-login-title",children:_.title})]}),e("div",{className:"itd-login-rule"}),ve,be?e("span",{className:"itd-signup-step-title",children:be}):null,me?n(i,{children:[_.codeHint||E?n("p",{className:"itd-login-hint",children:[_.codeHint,E?n(i,{children:[" ",e("span",{className:"itd-signup-masked",children:E}),_.editIdentity?n(i,{children:[" · ",e("button",{type:"button",className:"itd-signup-edit",onClick:K,children:_.editIdentity})]}):null]}):null]}):null,n("div",{className:"itd-login-code",children:[e(m,{ref:Z,size:"x-large",length:H,value:ne,onChange:ie,autoFocus:!0,"aria-label":be??_.title}),e(p,{type:"button",size:"x-large",loading:T,disabled:fe,onClick:()=>{ne.length!==H||T||O?.(ne)},style:{width:"100%"},children:_.verifySubmit??_.continue??_.submit})]}),e("div",{className:"itd-login-actions",children:se.active?e("span",{className:"itd-login-countdown",children:se.label}):_.resendCode?e(p,{variant:"filled",size:"medium",onClick:U,disabled:T,children:_.resendCode}):null})]}):n(o,{name:"sign-up",ref:X,onFinish:e=>{const n={},i=de?l.filter(e=>k(e)===ce):l;for(const l of i){if(l.readonly){void 0!==l.value&&(n[l.name]=l.value);continue}if(!(l.name in e)&&!(l.name in te.current))continue;const i=e[l.name]??te.current[l.name];n[l.name]="phone"===l.kind?N(Y,String(i??"")):"consent"===l.kind?!0===i||"true"===i:i}ue&&(n.code=ne),de?R?.(ce,n):W?.(n)},onValidated:ee,children:[e("div",{className:"itd-signup-fields"+(!de&&w?" itd-signup-fields-grid":""),children:pe.map(i=>{if(i.readonly){const n=null!=i.value?String(i.value):void 0,l=i.span?"itd-signup-span":void 0;if("select"===i.kind){const a=i.options?.length||!n?i.options??[]:[{value:n,label:n}];return e(h,{size:"x-large",value:n,disabled:!0,className:l,"aria-label":"string"==typeof i.label?i.label:void 0,children:a.map(n=>e(C,{value:n.value,children:n.label},n.value))},i.name)}return e(c,{size:"x-large",value:n,disabled:!0,className:l,addonBefore:i.icon,"aria-label":"string"==typeof i.label?i.label:void 0},i.name)}if(i.collapsed&&!le[i.name])return e(p,{variant:"ghost",size:"medium",className:"itd-signup-reveal itd-signup-span",onClick:()=>ae(e=>({...e,[i.name]:!0})),children:i.label},i.name);const l=[...i.required?[{required:!0}]:[],...i.rules??[]],a="string"==typeof i.label?i.label:void 0,t=i.span?"itd-signup-span":void 0;switch(i.kind){case"phone":return e(d,{name:i.name,className:t,rules:[...l,{validator:e=>!i.required&&!String(e??"").length||b(Y,String(e??""))}],children:e(c,{type:f.TEL,size:"x-large",inputMode:"numeric",autoComplete:"tel-national",mask:Y?.mask??null,placeholder:a,addonBefore:i.icon,onChange:ge(i.name),prefix:e("span",{className:"itd-login-dial",children:Y?.code})})},i.name);case"email":return e(d,{name:i.name,className:t,rules:l,children:e(c,{type:f.EMAIL,size:"x-large",autoComplete:"email",placeholder:a,addonBefore:i.icon,onChange:ge(i.name)})},i.name);case"username":return n("div",{className:"itd-signup-suggested itd-signup-span",children:[n("div",{className:"itd-signup-suggested-row",children:[e(d,{name:i.name,rules:l,children:e(c,{size:"x-large",autoComplete:"username",placeholder:a,defaultValue:F,addonBefore:i.icon,onChange:ge(i.name)})},F??""),_.newSuggestion&&G?e(p,{variant:"solid",size:"x-large",onClick:G,disabled:T,children:_.newSuggestion}):null]}),_.suggestedHint&&F?e("span",{className:"itd-signup-note",children:_.suggestedHint}):null]},i.name);case"password":return i.confirm?n("div",{className:"itd-signup-pair itd-signup-span",children:[e(d,{name:i.name,rules:l,children:e(c,{type:f.PASSWORD,size:"x-large",autoComplete:"new-password",placeholder:a,addonBefore:i.icon,onChange:ge(i.name)})}),e(d,{name:i.name+"_confirm",rules:[...i.required?[{required:!0}]:[],{validator:e=>String(e??"")===(te.current[i.name]??"")}],children:e(c,{type:f.PASSWORD,size:"x-large",autoComplete:"new-password",placeholder:i.confirmLabel,addonBefore:i.icon,onChange:ge(i.name+"_confirm")})})]},i.name):e(d,{name:i.name,rules:l,children:e(c,{type:f.PASSWORD,size:"x-large",autoComplete:"new-password",placeholder:a,addonBefore:i.icon,onChange:ge(i.name)})},i.name);case"date":return e(d,{name:i.name,className:t,rules:l,children:e(g,{size:"x-large",placeholder:a,onChange:ge(i.name)})},i.name);case"select":return e(d,{name:i.name,className:t,rules:l,children:e(h,{size:"x-large",placeholder:a,onChange:ge(i.name),children:(i.options??[]).map(n=>e(C,{value:n.value,children:n.label},n.value))})},i.name);case"consent":return e(d,{name:i.name,className:"itd-signup-span",rules:i.required?[{validator:e=>!0===e||"true"===e}]:[],children:e(u,{onChange:e=>ge(i.name)(String(!!e?.checked)),children:i.label})},i.name);default:return e(d,{name:i.name,className:t,rules:l,children:e(c,{size:"x-large",placeholder:a,addonBefore:i.icon,onChange:ge(i.name)})},i.name)}})}),ue?n("div",{className:"itd-signup-inline-verify",children:[_.inFormVerifyTitle?e("span",{className:"itd-signup-step-title",children:_.inFormVerifyTitle}):null,_.codeHint?e("p",{className:"itd-login-hint",children:_.codeHint}):null,e(m,{ref:Z,size:"x-large",length:H,value:ne,onChange:ie,disabled:!he,"aria-label":_.inFormVerifyTitle??_.title}),e("div",{className:"itd-login-actions",children:se.active?e("span",{className:"itd-login-countdown",children:se.label}):_.resendCode?e(p,{variant:"filled",size:"medium",onClick:U,disabled:T,children:_.resendCode}):null})]}):null,e(y,{children:e(p,{type:"submit",size:"x-large",loading:T,disabled:fe,style:{width:"100%"},children:de&&ce!==oe[oe.length-1]?_.continue??_.submit:_.submit})})]}),_.haveAccount||_.signIn?n("div",{className:"itd-signup-footer",children:[_.haveAccount?e("span",{className:"itd-signup-footer-note",children:_.haveAccount}):null,_.signIn?e(p,{variant:"ghost",size:"medium",onClick:J,children:_.signIn}):null]}):null]})]})});z.displayName="SignupPanel";export{z as SignupPanel,z as default,S as deriveSteps,k as stepOf};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as i}from"react/jsx-runtime";import{useMemo as l}from"react";import s from"../../_bundled/embla-carousel-react/esm/embla-carousel-react.esm.js";import d from"../../_bundled/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js";import{GetClassNameByPlatform as r}from"../../helpers/classname/GetClassNameByPlatform.js";import
|
|
1
|
+
import{jsx as e,jsxs as i}from"react/jsx-runtime";import{useMemo as l}from"react";import s from"../../_bundled/embla-carousel-react/esm/embla-carousel-react.esm.js";import d from"../../_bundled/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js";import{GetClassNameByPlatform as r}from"../../helpers/classname/GetClassNameByPlatform.js";import a from"../embla/useEmblaState.js";const t=({id:t,slides:n,autoplay:o=4e3,loop:c=!0,dots:m=!0,slideSize:u,slideSpacing:p,dotLabel:b=e=>"Slide "+(e+1),hideBackground:h=!1,className:N})=>{const g=l(()=>({loop:c}),[c]),v=l(()=>!1===o?[]:[d({delay:o})],[o]),[f,y]=s(g,v),{selected:S}=a(y),j=r,k={...u?{"--itd-slider-slide-size":u}:null,...p?{"--itd-slider-spacing":p}:null};return e("section",{id:t??j("inn-slider-component"),className:"itd-slider-block"+(N?" "+N:""),style:k,"data-background":String(!h),"data-has-slides":String(n.length>0),children:i("div",{className:j("inn-slider")+" itd-slider",children:[e("div",{ref:f,className:j("inn-slider-viewport")+" itd-slider-viewport",children:e("div",{className:j("inn-slider-container")+" itd-slider-container",children:n.map((i,l)=>e("div",{className:j("inn-slider-slide")+" itd-slider-slide","data-background":String(!h),children:e("div",{className:j("inn-slider-slide-number"),children:i})},l))})}),m&&n.length>1&&e("div",{className:j("inn-slider-controls")+" itd-slider-controls",children:e("div",{className:j("inn-slider-dots")+" itd-slider-dots",children:n.map((i,l)=>e("button",{type:"button","aria-label":b(l),"aria-current":l===S||void 0,className:j("inn-slider-dot")+" itd-slider-dot"+(l===S?" "+j("inn-slider-dot")+"-selected":""),onClick:()=>y?.scrollTo(l)},l))})})]})})};export{t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as a}from"react/jsx-runtime";import{useState as n,useEffect as r,useMemo as i,useRef as s}from"react";import{ChevronLeft as l,CheckCircle2 as o,ChevronRight as d}from"lucide-react";import m from"../../button/index.js";import c from"../../image/index.js";import u from"../../skeleton/index.js";import h from"../../spin/index.js";import p from"../game-box/index.js";import v from"../post-viewer/index.js";import g from"../default-avatar/index.js";import b from"../filter-tabs/index.js";import{HoverCard as N}from"../../hovercard/HoverCard.js";import{HoverCardTrigger as y}from"../../hovercard/HoverCardTrigger.js";import{HoverCardContent as f}from"../../hovercard/HoverCardContent.js";import{ComponentYPositions as k}from"../../enums/enum.js";import{GetPlatform as x}from"../../helpers/platform/index.js";import{PlatformTypes as w}from"../../helpers/classname/GetClassNameByPlatform.js";import{useLoadMoreSentinel as z}from"../../hooks/useLoadMoreSentinel.js";const C=[{value:"all",label:"Tümü"},{value:"registration",label:"Yaklaşan"},{value:"competition",label:"Canlı"},{value:"ended",label:"Sona Erdi"}],j={registration:"Yaklaşan",competition:"Canlı",ended:"Sona Erdi"},T=()=>x()===w.MOBILE,S=e=>e?Math.max(0,new Date(e).getTime()-Date.now()):0,M=(e,t=!0)=>{const[a,i]=n(()=>S(e));r(()=>{if(!t||!e)return;i(S(e));const a=setInterval(()=>i(S(e)),1e3);return()=>clearInterval(a)},[e,t]);const s=Math.floor(a/1e3);return{ms:a,days:Math.floor(s/86400),hours:Math.floor(s%86400/3600),minutes:Math.floor(s%3600/60),seconds:s%60}},K=e=>String(e).padStart(2,"0"),A=({status:e})=>t("span",{className:"itd-tournament-status","data-status":e,children:j[e]}),O=({tournament:a,onOpen:n})=>{const r=a,i="ended"!==r.status,s="registration"===r.status?r.registerEndsAt??r.startsAt:r.endsAt,l=M(s,i),o=r.providers??[],d=(r.games??[]).slice(0,4),m=Math.max(0,(r.gamesCount??r.games?.length??0)-d.length),u=l.days>0?`${l.days} gün ${K(l.hours)}:${K(l.minutes)}:${K(l.seconds)}`:`${K(l.hours)}:${K(l.minutes)}:${K(l.seconds)}`;return e("div",{className:"tournament-card itd-tournament-card",onClick:n?()=>n(r.id):void 0,onKeyDown:n?e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n(r.id))}:void 0,role:n?"button":void 0,tabIndex:n?0:void 0,children:[e("div",{className:"tournament-card-cover itd-tournament-card-cover",children:[t("span",{className:"tournament-card-status itd-tournament-card-status",children:t(A,{status:r.status})}),t(c,{src:r.image??"",alt:r.name})]}),e("div",{className:"tournament-card-body itd-tournament-card-body",children:[t("h3",{className:"tournament-card-name itd-tournament-card-name",children:r.name}),e("div",{className:"tournament-card-meta itd-tournament-card-meta",children:[e("div",{className:"tournament-card-prize itd-tournament-card-prize",children:[t("span",{className:"itd-tournament-meta-label",children:"Ödül Tutarı"}),t("span",{className:"itd-tournament-prize-value",children:r.prize})]}),i&&e("div",{className:"tournament-card-countdown itd-tournament-card-countdown",children:[t("span",{className:"itd-tournament-meta-label",children:"Kalan Süre"}),t("span",{className:"itd-tournament-countdown-value",children:u})]})]}),d.length>0&&e("div",{className:"tournament-card-games itd-tournament-card-games",children:[t("span",{className:"tournament-card-games-title itd-tournament-meta-label",children:"Oyunlar"}),e("div",{className:"tournament-card-games-row itd-tournament-card-games-row",children:[d.map(e=>t("span",{className:"tournament-card-games-cell itd-tournament-card-games-cell",children:t(p,{name:"",slug:e.slug??e.id,image:e.image,ratio:"440/310"})},e.id)),m>0&&t("span",{className:"tournament-card-games-more itd-tournament-card-games-more",children:e("span",{children:["+",m]})})]})]}),e("div",{className:"tournament-card-footer itd-tournament-card-footer",children:[e("span",{className:"tournament-card-participants",children:[r.participantCount," katılımcı"]}),o.length>0&&t("div",{className:"tournament-card-providers itd-tournament-card-providers"+(o.length>1?" is-interactive":""),onClick:e=>o.length>1&&e.stopPropagation(),children:o.length>1?e(N,{children:[t(y,{asChild:!0,children:e("span",{className:"tournament-card-providers-label",children:[o[0],e("em",{className:"tournament-card-providers-more",children:["+",o.length-1]})]})}),t(f,{placement:k.TOP,variant:"filled",maxWidth:240,children:t("div",{className:"itd-tournament-providers-card",children:o.map(e=>t("span",{children:e},e))})})]}):t("span",{className:"tournament-card-providers-label",children:o[0]})})]})]})]})},P=({tournaments:n,loading:r=!1,filters:i=C,filter:s="all",onFilterChange:l,onOpen:o,hasMore:d=!1,loadingMore:c=!1,onLoadMore:p,emptyTitle:v="Turnuva bulunamadı",emptyText:g="Bu filtreye uyan bir turnuva yok. Diğer sekmelere göz atabilirsiniz."})=>{const N=T()?4:8;return e("div",{className:"tournament-list itd-tournament-list",children:[t("div",{className:"tournament-list-filters itd-tournament-filters",children:t(b,{options:i,value:s,onChange:l,"aria-label":"Turnuva durumu"})}),r?t("div",{className:"tournament-list-skeleton-grid itd-tournament-grid",children:Array.from({length:N},(a,n)=>e("div",{className:"tournament-list-skeleton-box itd-tournament-skeleton-box",children:[t("span",{className:"tournament-list-skeleton-cover itd-tournament-skeleton-cover",children:t(u,{width:"100%",height:"100%"})}),e("span",{className:"tournament-list-skeleton-body itd-tournament-skeleton-body",children:[t(u,{width:"65%",height:"1rem"}),t(u,{width:"40%",height:"0.75rem"}),t(u,{width:"50%",height:"0.75rem"})]})]},n))}):0===n.length?e("div",{className:"tournament-list-empty itd-tournament-empty",children:[t("h3",{children:v}),t("span",{children:g})]}):e(a,{children:[t("div",{className:"tournament-list-grid itd-tournament-grid",children:n.map(e=>t(O,{tournament:e,onOpen:o},e.id))}),d&&t("div",{className:"tournament-list-load-more itd-tournament-load-more",children:c?t(h,{}):t(m,{variant:"outline-accent",size:"medium",onClick:p,children:"Daha Fazla Göster"})})]})]})},D=[{value:"prizes",label:"Ödüller"},{value:"leaderboard",label:"Puan Tablosu"},{value:"rules",label:"Kurallar"}],E=({tournament:u,onBack:N,backText:y="Turnuvalara Dön",onJoin:f,onPlayGame:k,gamesStep:x,standingsHasMore:w=!1,standingsLoading:C=!1,onStandingsMore:j})=>{const S=u,O=T(),P="ended"!==S.status,E="registration"===S.status?S.registerEndsAt??S.startsAt:S.endsAt,L=M(E,P),B=x??15,[G,$]=n(B),[H,I]=n("prizes"),[R,W]=n("site"),F=S.games??[],J=F.slice(0,G),Y=F.length-J.length,q="registration"===S.status?"Kayıt bitişine kalan süre":"Turnuva bitişine kalan süre",Q=i(()=>Array.isArray(S.rules)&&S.rules.length>0?t(v,{blocks:S.rules}):"string"==typeof S.rules&&""!==S.rules.trim()?t("div",{className:"itd-tournament-rules-text",children:S.rules}):t("span",{className:"itd-tournament-panel-empty",children:"Kural bilgisi bulunmuyor."}),[S.rules]),U=s(null),[V,X]=n({prev:!1,next:!1});r(()=>{const e=U.current;if(!e)return;const t=()=>X({prev:e.scrollLeft>4,next:e.scrollLeft<e.scrollWidth-e.clientWidth-4});t();const a=new ResizeObserver(t);return a.observe(e),e.addEventListener("scroll",t,{passive:!0}),()=>{a.disconnect(),e.removeEventListener("scroll",t)}},[S.stats]);const Z=e=>{const t=U.current;t&&t.scrollBy({left:e*t.clientWidth*.85,behavior:"smooth"})},_="ended"===S.status?"Kazananlar":"Puan Tablosu",ee=(S.globalStandings?.length??0)>0,te="global"===R&&ee?S.globalStandings:S.standings??[],ae="site"===R,ne=z(ae&&w&&!C,j),re=e("div",{className:"tournament-prizes itd-tournament-panel itd-tournament-prizes",children:[t("h3",{className:"tournament-box-title itd-tournament-box-title",children:"Ödüller"}),S.prizeRows&&S.prizeRows.length>0?e(a,{children:[e("div",{className:"tournament-prizes-header itd-tournament-panel-header",children:[t("span",{children:"Sıra"}),t("span",{children:"Ödül"})]}),t("div",{className:"itd-tournament-panel-list",children:S.prizeRows.map(a=>e("div",{className:"tournament-prize-row itd-tournament-prize-row",children:[t("b",{children:a.rank}),t("span",{children:a.value})]},a.rank))})]}):t("span",{className:"itd-tournament-panel-empty",children:"Ödül bilgisi bulunmuyor."})]}),ie=e("div",{className:"tournament-standings itd-tournament-panel itd-tournament-standings",children:[t("h3",{className:"tournament-box-title itd-tournament-box-title",children:_}),ee&&t("div",{className:"tournament-standings-scope itd-tournament-scope",children:t(b,{grow:!0,options:[{value:"site",label:"Site"},{value:"global",label:"Global"}],value:R,onChange:e=>W(e),"aria-label":"Sıralama kapsamı"})}),te.length>0?e(a,{children:[e("div",{className:"tournament-standings-header itd-tournament-panel-header itd-tournament-standings-header",children:[t("span",{children:"#"}),t("span",{children:"Kullanıcı"}),t("span",{children:"ended"===S.status?"Ödül":"Puan"})]}),e("div",{className:"itd-tournament-panel-list",children:[te.map(a=>e("div",{className:"tournament-standings-row itd-tournament-standings-row"+(a.highlight?" is-highlight":""),"data-top":a.position<=3?"":void 0,children:[t("b",{className:"itd-tournament-rank",children:a.position}),t("span",{className:"itd-tournament-standings-photo",children:a.photo?t("img",{src:a.photo,alt:""}):t(g,{})}),t("span",{className:"itd-tournament-standings-user",children:a.username??"—"}),t("span",{className:"itd-tournament-standings-value",children:a.value})]},a.position)),ae&&(w||C)&&t("div",{className:"itd-tournament-board-sentinel",ref:ne,children:C&&t(h,{})})]})]}):t("span",{className:"itd-tournament-panel-empty",children:"site"===R&&ee?"Bu sitede sıralama oluşmadı — Global sekmesine bakabilirsiniz.":"ended"===S.status?"Kazanan bilgisi henüz yayınlanmadı.":"Puan tablosu henüz oluşmadı."})]}),se=e("div",{className:"tournament-rules itd-tournament-panel itd-tournament-rules",children:[t("h3",{className:"tournament-box-title itd-tournament-box-title",children:"Kurallar"}),t("div",{className:"tournament-rules-scroll itd-tournament-rules-scroll",children:Q})]});return e("div",{className:"tournament-detail itd-tournament-detail",children:[e("div",{className:"tournament-detail-backbar itd-tournament-backbar",children:[e(m,{variant:"filled",size:"medium",onClick:N,children:[t(l,{size:16}),y]}),t("div",{className:"tournament-detail-backbar-actions itd-tournament-backbar-actions",children:S.autoJoin?e("span",{className:"tournament-detail-auto-badge itd-tournament-auto-badge",children:[t(o,{size:15}),"Otomatik Katılım"]}):P&&f&&t(m,{className:"inn-tournament-participate itd-tournament-participate",variant:S.joined?"statable":"default",state:S.joined?"reject":void 0,size:"medium",onClick:f,children:S.joined?"Katılımdan Ayrıl":"Hemen Katıl"})})]}),e("div",{className:"tournament-cover itd-tournament-cover",children:[t("div",{className:"tournament-cover-image itd-tournament-cover-image",children:t(c,{src:S.cover??S.image??"",alt:S.name})}),t("div",{className:"tournament-cover-overlay itd-tournament-cover-overlay",children:e("div",{className:"tournament-cover-panel itd-tournament-cover-panel",children:[t(A,{status:S.status}),e("div",{className:"itd-tournament-cover-prize",children:[t("span",{className:"itd-tournament-meta-label",children:"Ödül Tutarı"}),t("b",{className:"itd-tournament-cover-amount",children:S.prize})]}),P&&e("div",{className:"itd-tournament-cover-countdown",children:[t("span",{className:"itd-tournament-cover-caption",children:q}),t("div",{className:"itd-tournament-timer",children:[[L.days,"Gün"],[L.hours,"Saat"],[L.minutes,"Dakika"],[L.seconds,"Saniye"]].map(([a,n])=>e("span",{className:"tournament-cover-countdown-box itd-tournament-timer-box",children:[t("b",{children:K(a)}),t("span",{children:n})]},n))})]})]})})]}),(S.description||S.name)&&e("div",{className:"tournament-detail-description-box itd-tournament-description",children:[t("h3",{children:S.name}),S.description&&t("div",{children:S.description})]}),S.stats&&S.stats.length>0&&e("div",{className:"tournament-stats itd-tournament-stats",children:[V.prev&&t("button",{type:"button",className:"tournament-stats-arrow itd-tournament-stats-arrow","data-dir":"prev","aria-label":"Geri",onClick:()=>Z(-1),children:t(l,{size:16})}),t("div",{className:"tournament-stats-track itd-tournament-stats-track",ref:U,children:S.stats.map(a=>e("div",{className:"tournament-stats-box itd-tournament-stats-box",children:[t("span",{className:"itd-tournament-box-caption",children:a.title}),t("div",{className:"itd-tournament-stats-rows",children:a.rows.map(a=>e("div",{className:"itd-tournament-stats-row",children:[t("span",{children:a.label}),t("span",{"data-tone":a.tone,children:a.value})]},a.label))})]},a.title))}),V.next&&t("button",{type:"button",className:"tournament-stats-arrow itd-tournament-stats-arrow","data-dir":"next","aria-label":"İleri",onClick:()=>Z(1),children:t(d,{size:16})})]}),S.providers&&S.providers.length>0&&e("div",{className:"itd-tournament-section",children:[t("h3",{className:"tournament-box-title itd-tournament-box-title",children:"Sağlayıcılar"}),t("div",{className:"itd-tournament-provider-chips",children:S.providers.map(e=>t("span",{className:"tournament-detail-provider-chip itd-tournament-provider-chip",children:e},e))})]}),e("div",{className:"itd-tournament-section",children:[t("h3",{className:"tournament-box-title itd-tournament-box-title",children:"Turnuva Oyunları"}),F.length>0?e("div",{className:"tournament-games-grid itd-tournament-games-grid",children:[J.map(e=>t(p,{name:O?"":e.name,slug:e.slug??e.id,image:e.image,ratio:"440/310",onPlay:k?e=>k(e):void 0},e.id)),Y>0&&t("button",{type:"button",className:"tournament-games-more itd-tournament-games-more",onClick:()=>$(e=>e+B),children:e("span",{children:["+",Y]})})]}):t("div",{className:"tournament-games-empty itd-tournament-games-empty",children:t("span",{children:"Bu turnuvaya tanımlı oyun bulunmuyor."})})]}),O?e(a,{children:[t("div",{className:"tournament-detail-tabs itd-tournament-tabs",children:t(b,{grow:!0,options:D.map(e=>({value:e.value,label:"leaderboard"===e.value?_:e.label})),value:H,onChange:e=>I(e),"aria-label":"Turnuva panelleri"})}),"prizes"===H&&re,"leaderboard"===H&&ie,"rules"===H&&se]}):e("div",{className:"tournament-detail-panels itd-tournament-panels",children:[re,ie,se]})]})},L=({title:a,children:n,className:r})=>{const i=T(),s=i?"inn-mobile-tournament":"inn-tournament";return e("div",{id:s+"-component",className:(i?"inn-mobile-tournament":"inn-tournament")+" itd-tournaments"+(r?" "+r:""),children:[a&&t("div",{id:s+"-title",className:"tournament-title itd-tournaments-title",children:a}),t("div",{className:"tournament-content-wrapper itd-tournaments-content",children:n})]})};export{O as TournamentCard,E as TournamentDetail,P as TournamentList,L as default};
|
|
1
|
+
import{jsxs as t,jsx as e,Fragment as a}from"react/jsx-runtime";import{useState as n,useEffect as r,useMemo as i,useRef as s}from"react";import{ChevronLeft as o,CheckCircle2 as l,ChevronRight as d}from"lucide-react";import m from"../../button/index.js";import c from"../../image/index.js";import u from"../../skeleton/index.js";import h from"../../spin/index.js";import p from"../game-box/index.js";import v from"../post-viewer/index.js";import g from"../default-avatar/index.js";import b from"../filter-tabs/index.js";import{HoverCard as N}from"../../hovercard/HoverCard.js";import{HoverCardTrigger as y}from"../../hovercard/HoverCardTrigger.js";import{HoverCardContent as f}from"../../hovercard/HoverCardContent.js";import{ComponentYPositions as k}from"../../enums/enum.js";import{GetPlatform as w}from"../../helpers/platform/index.js";import{PlatformTypes as x}from"../../helpers/classname/GetClassNameByPlatform.js";import{useLoadMoreSentinel as z}from"../../hooks/useLoadMoreSentinel.js";const C=[{value:"all",label:"Tümü"},{value:"registration",label:"Yaklaşan"},{value:"competition",label:"Canlı"},{value:"ended",label:"Sona Erdi"}],j={registration:"Yaklaşan",competition:"Canlı",ended:"Sona Erdi"},T=()=>w()===x.MOBILE,S=t=>t?Math.max(0,new Date(t).getTime()-Date.now()):0,M=(t,e=!0)=>{const[a,i]=n(()=>S(t));r(()=>{if(!e||!t)return;i(S(t));const a=setInterval(()=>i(S(t)),1e3);return()=>clearInterval(a)},[t,e]);const s=Math.floor(a/1e3);return{ms:a,days:Math.floor(s/86400),hours:Math.floor(s%86400/3600),minutes:Math.floor(s%3600/60),seconds:s%60}},K=t=>String(t).padStart(2,"0"),A=({status:t})=>e("span",{className:"itd-tournament-status","data-status":t,children:j[t]}),O=({tournament:a,onOpen:n})=>{const r=a,i="ended"!==r.status,s="registration"===r.status?r.registerEndsAt??r.startsAt:r.endsAt,o=M(s,i),l=r.providers??[],d=(r.games??[]).slice(0,4),m=Math.max(0,(r.gamesCount??r.games?.length??0)-d.length),u=o.days>0?`${o.days} gün ${K(o.hours)}:${K(o.minutes)}:${K(o.seconds)}`:`${K(o.hours)}:${K(o.minutes)}:${K(o.seconds)}`;return t("div",{className:"tournament-card itd-tournament-card",onClick:n?()=>n(r.id):void 0,onKeyDown:n?t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),n(r.id))}:void 0,role:n?"button":void 0,tabIndex:n?0:void 0,children:[t("div",{className:"tournament-card-cover itd-tournament-card-cover",children:[e("span",{className:"tournament-card-status itd-tournament-card-status",children:e(A,{status:r.status})}),e(c,{src:r.image??"",alt:r.name})]}),t("div",{className:"tournament-card-body itd-tournament-card-body",children:[e("h3",{className:"tournament-card-name itd-tournament-card-name",children:r.name}),t("div",{className:"tournament-card-meta itd-tournament-card-meta",children:[t("div",{className:"tournament-card-prize itd-tournament-card-prize",children:[e("span",{className:"itd-tournament-meta-label tournament-card-prize-label",children:"Ödül Tutarı"}),e("span",{className:"itd-tournament-prize-value tournament-card-prize-value",children:r.prize})]}),i&&t("div",{className:"tournament-card-countdown itd-tournament-card-countdown",children:[e("span",{className:"itd-tournament-meta-label tournament-card-countdown-label",children:"Kalan Süre"}),e("span",{className:"itd-tournament-countdown-value tournament-card-countdown-value",children:u})]})]}),d.length>0&&t("div",{className:"tournament-card-games itd-tournament-card-games",children:[e("span",{className:"tournament-card-games-title itd-tournament-meta-label",children:"Oyunlar"}),t("div",{className:"tournament-card-games-row itd-tournament-card-games-row",children:[d.map(t=>e("span",{className:"tournament-card-games-cell itd-tournament-card-games-cell",children:e(p,{name:"",slug:t.slug??t.id,image:t.image,ratio:"440/310"})},t.id)),m>0&&e("span",{className:"tournament-card-games-more itd-tournament-card-games-more",children:t("span",{children:["+",m]})})]})]}),t("div",{className:"tournament-card-footer itd-tournament-card-footer",children:[t("span",{className:"tournament-card-participants",children:[r.participantCount," katılımcı"]}),l.length>0&&e("div",{className:"tournament-card-providers itd-tournament-card-providers"+(l.length>1?" is-interactive":""),onClick:t=>l.length>1&&t.stopPropagation(),children:l.length>1?t(N,{children:[e(y,{asChild:!0,children:t("span",{className:"tournament-card-providers-label",children:[l[0],t("em",{className:"tournament-card-providers-more",children:["+",l.length-1]})]})}),e(f,{placement:k.TOP,variant:"filled",maxWidth:240,children:e("div",{className:"itd-tournament-providers-card",children:l.map(t=>e("span",{children:t},t))})})]}):e("span",{className:"tournament-card-providers-label",children:l[0]})})]})]})]})},P=({tournaments:n,loading:r=!1,filters:i=C,filter:s="all",onFilterChange:o,onOpen:l,hasMore:d=!1,loadingMore:c=!1,onLoadMore:p,emptyTitle:v="Turnuva bulunamadı",emptyText:g="Bu filtreye uyan bir turnuva yok. Diğer sekmelere göz atabilirsiniz."})=>{const N=T()?4:8;return t("div",{className:"tournament-list itd-tournament-list",children:[e("div",{className:"tournament-list-filters itd-tournament-filters",children:e(b,{className:"tournament-list-filters-list",options:i,value:s,onChange:o,"aria-label":"Turnuva durumu"})}),r?e("div",{className:"tournament-list-skeleton-grid itd-tournament-grid",children:Array.from({length:N},(a,n)=>t("div",{className:"tournament-list-skeleton-box itd-tournament-skeleton-box",children:[e("span",{className:"tournament-list-skeleton-cover itd-tournament-skeleton-cover",children:e(u,{width:"100%",height:"100%"})}),t("span",{className:"tournament-list-skeleton-body itd-tournament-skeleton-body",children:[e(u,{width:"65%",height:"1rem"}),e(u,{width:"40%",height:"0.75rem"}),e(u,{width:"50%",height:"0.75rem"})]})]},n))}):0===n.length?t("div",{className:"tournament-list-empty itd-tournament-empty",children:[e("h3",{children:v}),e("span",{children:g})]}):t(a,{children:[e("div",{className:"tournament-list-grid itd-tournament-grid",children:n.map(t=>e(O,{tournament:t,onOpen:l},t.id))}),d&&e("div",{className:"tournament-list-load-more itd-tournament-load-more",children:c?e(h,{}):e(m,{variant:"outline-accent",size:"medium",onClick:p,children:"Daha Fazla Göster"})})]})]})},D=[{value:"prizes",label:"Ödüller"},{value:"leaderboard",label:"Puan Tablosu"},{value:"rules",label:"Kurallar"}],E=({tournament:u,onBack:N,backText:y="Turnuvalara Dön",onJoin:f,onPlayGame:k,gamesStep:w,standingsHasMore:x=!1,standingsLoading:C=!1,onStandingsMore:j})=>{const S=u,O=T(),P="ended"!==S.status,E="registration"===S.status?S.registerEndsAt??S.startsAt:S.endsAt,L=M(E,P),B=w??15,[G,$]=n(B),[H,I]=n("prizes"),[R,W]=n("site"),F=S.games??[],J=F.slice(0,G),Y=F.length-J.length,q="registration"===S.status?"Kayıt bitişine kalan süre":"Turnuva bitişine kalan süre",Q=i(()=>Array.isArray(S.rules)&&S.rules.length>0?e(v,{blocks:S.rules}):"string"==typeof S.rules&&""!==S.rules.trim()?e("div",{className:"itd-tournament-rules-text tournament-rules-content",children:S.rules}):e("span",{className:"itd-tournament-panel-empty tournament-rules-empty",children:"Kural bilgisi bulunmuyor."}),[S.rules]),U=s(null),[V,X]=n({prev:!1,next:!1});r(()=>{const t=U.current;if(!t)return;const e=()=>X({prev:t.scrollLeft>4,next:t.scrollLeft<t.scrollWidth-t.clientWidth-4});e();const a=new ResizeObserver(e);return a.observe(t),t.addEventListener("scroll",e,{passive:!0}),()=>{a.disconnect(),t.removeEventListener("scroll",e)}},[S.stats]);const Z=t=>{const e=U.current;e&&e.scrollBy({left:t*e.clientWidth*.85,behavior:"smooth"})},_="ended"===S.status?"Kazananlar":"Puan Tablosu",tt=(S.globalStandings?.length??0)>0,et="global"===R&&tt?S.globalStandings:S.standings??[],at="site"===R,nt=z(at&&x&&!C,j),rt=t("div",{className:"tournament-prizes itd-tournament-panel itd-tournament-prizes",children:[e("h3",{className:"tournament-box-title itd-tournament-box-title",children:"Ödüller"}),S.prizeRows&&S.prizeRows.length>0?t(a,{children:[t("div",{className:"tournament-prizes-header itd-tournament-panel-header",children:[e("span",{children:"Sıra"}),e("span",{children:"Ödül"})]}),e("div",{className:"itd-tournament-panel-list tournament-prizes-list",children:S.prizeRows.map(a=>t("div",{className:"tournament-prize-row itd-tournament-prize-row",children:[e("b",{className:"tournament-prizes-place",children:a.rank}),e("span",{className:"tournament-prizes-payout",children:a.value})]},a.rank))})]}):e("span",{className:"itd-tournament-panel-empty tournament-prizes-empty",children:"Ödül bilgisi bulunmuyor."})]}),it=t("div",{className:"tournament-standings itd-tournament-panel itd-tournament-standings tournament-leaderboard",children:[e("h3",{className:"tournament-box-title itd-tournament-box-title",children:_}),tt&&e("div",{className:"tournament-standings-scope itd-tournament-scope",children:e(b,{grow:!0,options:[{value:"site",label:"Site"},{value:"global",label:"Global"}],value:R,onChange:t=>W(t),"aria-label":"Sıralama kapsamı"})}),et.length>0?t(a,{children:[t("div",{className:"tournament-standings-header itd-tournament-panel-header itd-tournament-standings-header",children:[e("span",{className:"pos tournament-standings-header-pos",children:"#"}),e("span",{className:"user tournament-standings-header-user",children:"Kullanıcı"}),e("span",{className:"tournament-standings-header-score",children:"ended"===S.status?"Ödül":"Puan"})]}),t("div",{className:"itd-tournament-panel-list tournament-standings-list"+("ended"===S.status?" tournament-standings-list--winners":" tournament-standings-list--leaderboard"),children:[et.map(a=>t("div",{className:"tournament-standings-row itd-tournament-standings-row"+(a.highlight?" is-highlight":""),"data-top":a.position<=3?"":void 0,children:[e("b",{className:"itd-tournament-rank tournament-standings-position",children:a.position}),e("span",{className:"itd-tournament-standings-photo tournament-standings-photo",children:a.photo?e("img",{src:a.photo,alt:""}):e(g,{})}),e("span",{className:"itd-tournament-standings-user tournament-standings-user",children:a.username??"—"}),e("span",{className:"itd-tournament-standings-value tournament-standings-score",children:a.value})]},a.position)),at&&(x||C)&&e("div",{className:"itd-tournament-board-sentinel",ref:nt,children:C&&e(h,{})})]})]}):e("span",{className:"itd-tournament-panel-empty tournament-standings-empty"+("ended"===S.status?" tournament-standings-empty--winners":" tournament-standings-empty--leaderboard"),children:"site"===R&&tt?"Bu sitede sıralama oluşmadı — Global sekmesine bakabilirsiniz.":"ended"===S.status?"Kazanan bilgisi henüz yayınlanmadı.":"Puan tablosu henüz oluşmadı."})]}),st=t("div",{className:"tournament-rules itd-tournament-panel itd-tournament-rules",children:[e("h3",{className:"tournament-box-title itd-tournament-box-title",children:"Kurallar"}),e("div",{className:"tournament-rules-scroll itd-tournament-rules-scroll",children:Q})]});return t("div",{className:"tournament-detail itd-tournament-detail",children:[t("div",{className:"tournament-detail-backbar itd-tournament-backbar",children:[t(m,{variant:"filled",size:"medium",onClick:N,children:[e(o,{size:16}),y]}),e("div",{className:"tournament-detail-backbar-actions itd-tournament-backbar-actions",children:S.autoJoin?t("span",{className:"tournament-detail-auto-badge itd-tournament-auto-badge",children:[e(l,{size:15}),"Otomatik Katılım"]}):P&&f&&e(m,{className:"inn-tournament-participate itd-tournament-participate",variant:S.joined?"statable":"default",state:S.joined?"reject":void 0,size:"medium",onClick:f,children:S.joined?"Katılımdan Ayrıl":"Hemen Katıl"})})]}),t("div",{className:"tournament-cover itd-tournament-cover",children:[e("div",{className:"tournament-cover-image itd-tournament-cover-image",children:e(c,{src:S.cover??S.image??"",alt:S.name})}),e("div",{className:"tournament-cover-overlay itd-tournament-cover-overlay",children:t("div",{className:"tournament-cover-panel itd-tournament-cover-panel",children:[e(A,{status:S.status}),t("div",{className:"itd-tournament-cover-prize tournament-cover-prize",children:[e("span",{className:"itd-tournament-meta-label tournament-cover-prize-label",children:"Ödül Tutarı"}),e("b",{className:"itd-tournament-cover-amount tournament-cover-prize-amount",children:S.prize})]}),P&&t("div",{className:"itd-tournament-cover-countdown tournament-cover-countdown",children:[e("span",{className:"itd-tournament-cover-caption tournament-cover-countdown-caption",children:q}),e("div",{className:"itd-tournament-timer tournament-cover-countdown-timer",children:[[L.days,"Gün"],[L.hours,"Saat"],[L.minutes,"Dakika"],[L.seconds,"Saniye"]].map(([a,n])=>t("span",{className:"tournament-cover-countdown-box itd-tournament-timer-box",children:[e("b",{children:K(a)}),e("span",{children:n})]},n))})]})]})})]}),(S.description||S.name)&&t("div",{className:"tournament-detail-description-box itd-tournament-description",children:[e("h3",{className:"tournament-detail-description-title",children:S.name}),S.description&&e("div",{className:"tournament-detail-description",children:S.description})]}),S.stats&&S.stats.length>0&&t("div",{className:"tournament-stats itd-tournament-stats",children:[V.prev&&e("button",{type:"button",className:"tournament-stats-arrow itd-tournament-stats-arrow tournament-stats-arrow--prev","data-dir":"prev","aria-label":"Geri",onClick:()=>Z(-1),children:e(o,{size:16})}),e("div",{className:"tournament-stats-track itd-tournament-stats-track",ref:U,children:S.stats.map(a=>t("div",{className:"tournament-stats-box itd-tournament-stats-box",children:[e("span",{className:"itd-tournament-box-caption tournament-stats-box-title",children:a.title}),e("div",{className:"itd-tournament-stats-rows tournament-stats-rows",children:a.rows.map(a=>t("div",{className:"itd-tournament-stats-row tournament-stats-row",children:[e("span",{children:a.label}),e("span",{"data-tone":a.tone,children:a.value})]},a.label))})]},a.title))}),V.next&&e("button",{type:"button",className:"tournament-stats-arrow itd-tournament-stats-arrow tournament-stats-arrow--next","data-dir":"next","aria-label":"İleri",onClick:()=>Z(1),children:e(d,{size:16})})]}),S.providers&&S.providers.length>0&&t("div",{className:"itd-tournament-section tournament-detail-section tournament-detail-section--providers",children:[e("h3",{className:"tournament-box-title itd-tournament-box-title",children:"Sağlayıcılar"}),e("div",{className:"itd-tournament-provider-chips tournament-detail-providers",children:S.providers.map(t=>e("span",{className:"tournament-detail-provider-chip itd-tournament-provider-chip",children:t},t))})]}),t("div",{className:"itd-tournament-section tournament-detail-section tournament-detail-section--games",children:[e("h3",{className:"tournament-box-title itd-tournament-box-title",children:"Turnuva Oyunları"}),F.length>0?t("div",{className:"tournament-games-grid itd-tournament-games-grid",children:[J.map(t=>e(p,{className:"tournament-game-item",name:O?"":t.name,slug:t.slug??t.id,image:t.image,ratio:"440/310",onPlay:k?t=>k(t):void 0},t.id)),Y>0&&e("button",{type:"button",className:"tournament-games-more itd-tournament-games-more",onClick:()=>$(t=>t+B),children:t("span",{children:["+",Y]})})]}):e("div",{className:"tournament-games-empty itd-tournament-games-empty",children:e("span",{children:"Bu turnuvaya tanımlı oyun bulunmuyor."})})]}),O?t(a,{children:[e("div",{className:"tournament-detail-tabs itd-tournament-tabs",children:e(b,{grow:!0,className:"tournament-detail-tabs-list",options:D.map(t=>({value:t.value,label:"leaderboard"===t.value?_:t.label})),value:H,onChange:t=>I(t),"aria-label":"Turnuva panelleri"})}),"prizes"===H&&rt,"leaderboard"===H&&it,"rules"===H&&st]}):t("div",{className:"tournament-detail-panels itd-tournament-panels",children:[rt,it,st]})]})},L=({title:a,children:n,className:r})=>{const i=T(),s=i?"inn-mobile-tournament":"inn-tournament";return t("div",{id:s+"-component",className:(i?"inn-mobile-tournament":"inn-tournament")+" itd-tournaments"+(r?" "+r:""),children:[a&&e("div",{id:s+"-title",className:"tournament-title itd-tournaments-title",children:a}),e("div",{className:"tournament-content-wrapper itd-tournaments-content",children:n})]})};export{O as TournamentCard,E as TournamentDetail,P as TournamentList,L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,
|
|
1
|
+
import{jsxs as e,Fragment as a,jsx as t}from"react/jsx-runtime";import{useState as i}from"react";import{Gift as l,Trash2 as s,Info as n}from"lucide-react";import r from"../../button/index.js";import d from"../../progress/index.js";import c from"../../select/index.js";import m from"../../alert/index.js";import{Tooltip as o}from"../../tooltip/Tooltip.js";import{TooltipTrigger as h}from"../../tooltip/TooltipTrigger.js";import{TooltipContent as u}from"../../tooltip/TooltipContent.js";import{HubPayFilter as p}from"./cashier.js";import{HubTable as b,HubCopyBtn as _,HubHistName as v,HubStatusBadge as k}from"./table.js";import{AlertDescription as g}from"../../alert/Description.js";import{SelectItem as y}from"../../select/SelectItem.js";const N=({kind:a,name:i,dateLabel:l,date:s,action:n,fields:r,children:d})=>e("section",{className:"hub__status-card",children:[e("div",{className:"hub__status-head",children:[e("div",{className:"hub__status-title",children:[t("span",{className:"hub__status-kind",children:a}),t("span",{className:"hub__status-name",children:i})]}),e("div",{className:"hub__status-side",children:[e("div",{className:"hub__status-date",children:[t("span",{children:l}),t("span",{className:"hub__status-dateval",children:s})]}),n]})]}),t("div",{className:"hub__status-grid",children:r.map(([a,i],l)=>e("div",{children:[t("span",{className:"hub__status-label",children:a}),t("span",{className:"hub__status-value",children:i})]},l))}),d]}),f=({data:s,cats:m,types:_,statuses:v,wagering:g,applies:N,onRequest:f,onCancel:w,marker:x={desktop:"inn-bonus-request-table",list:"inn-mobile-bonus-request-list",methods:"inn-mobile-bonus-request-list-methods",item:"inn-mobile-bonus-request-list-method-item"},nameTitle:T="İsim",catTitle:j="Kategori",typeTitle:I="Tip",wageringTitle:z="Çevrimli",statusTitle:L="Durum",percentTitle:C="Hak Ediş Yüzdesi",infoLabel:q="Bonus bilgisi",applyDatePrefix:B="Başvuru Tarihi: ",requestLabel:D="Talep Et",reRequestLabel:E="Tekrar Talep Et",cancelLabel:S="Talebi İptal Et",unavailableLabel:K="Talep Edilemez",openStatus:R="Açık",unavailableStatus:A="Talep Edilemez"})=>{const[H,P]=i(m[0]?.value??"all"),U=[{key:"name",dataIndex:"name",title:T,maxWidth:220,render:(a,i)=>e("span",{className:"hub__pay-name hub__hist-nm",children:[e("span",{className:"hub__bonus-name",children:[t("span",{className:"hub__bonus-title",children:i.name}),e(o,{children:[t(h,{asChild:!0,children:t("i",{className:"hub__hist-creator","aria-label":q,children:t(n,{size:14})})}),t(u,{placement:"top",children:i.desc})]})]}),i.applyDate&&t("span",{className:"hub__pay-desc",children:B+i.applyDate})]})},{key:"cat",dataIndex:"cat",title:j,width:90},{key:"type",dataIndex:"type",title:I,width:110},{key:"wagering",dataIndex:"wagering",title:z,width:90},{key:"status",dataIndex:"status",title:L,width:150,render:e=>t(k,{s:String(e)})},{key:"percent",dataIndex:"percent",title:C,width:170,render:e=>t("span",{className:"hub__bonus-progress",children:t(d,{percent:Number(e)})})},{key:"actions",dataIndex:"key",title:"",width:180,render:(a,i)=>t("span",{className:"hub__pay-actions hub__pay-actions--full",children:i.status===R?t(r,{variant:"statable",state:"reject",size:"medium",onClick:()=>w?.(i),children:S}):i.status===A?t(r,{variant:"filled",size:"medium",disabled:!0,children:K}):e(r,{variant:"default",size:"medium",onClick:()=>f?.(i),children:[t(l,{size:14}),i.applyDate?E:D]})})}];return e(a,{children:[t("div",{className:"hub__hist-cats--wide",children:t(p,{options:m,value:H,onChange:P,idPrefix:"brq"})}),t("div",{className:"hub__hist-filters hub__hist-filters--2",children:[_,v,g,N].map((e,a)=>t(c,{size:"x-large",defaultValue:e[0],children:e.map(e=>t(y,{value:e,children:e},e))},a))}),t(b,{columns:U,data:s,cellHeight:"84px",marker:x})]})},w=({data:i,intro:n,onAccept:d,onReject:c,marker:o={desktop:"inn-bonus-activation-table",list:"inn-mobile-bonus-activation-list",methods:"inn-mobile-bonus-activation-list-items",item:"inn-mobile-bonus-activation-list-method-item"},idTitle:h="Id",nameTitle:u="Bonus İsmi",catTitle:p="Kategori",amountTitle:k="Miktar",acceptLabel:y="Kabul Et",rejectLabel:N="Reddet"})=>{const f=[{key:"id",dataIndex:"key",title:h,width:50,render:(e,a)=>t(_,{value:a.key,compact:!0})},{key:"name",dataIndex:"name",title:u,maxWidth:300,render:(e,a)=>t(v,{name:a.name})},{key:"cat",dataIndex:"cat",title:p,width:150},{key:"amount",dataIndex:"amount",title:k,width:200,render:e=>t("span",{className:"hub__hist-amount",children:String(e)})},{key:"actions",dataIndex:"key",title:"",width:240,render:(a,i)=>e("span",{className:"hub__pay-actions",children:[e(r,{variant:"default",size:"medium",onClick:()=>d?.(i),children:[t(l,{size:14}),y]}),e(r,{variant:"statable",state:"reject",size:"medium",onClick:()=>c?.(i),children:[t(s,{size:14}),N]})]})}];return e(a,{children:[n&&t(m,{type:"info",variant:"filled",children:t(g,{children:n})}),t(b,{columns:f,data:i,cellHeight:"74px",marker:o})]})},x=({bonus:i,intro:l,onCancel:s,kindLabel:n="AKTİF BONUS",applyDateLabel:c="Başvuru Tarihi",cancelLabel:o="Bonusu İptal Et",wagerTitle:h="Bonus Çevrim Bilgisi",validLabel:u="Geçerlilik"})=>e(a,{children:[l&&t(m,{type:"info",variant:"filled",children:t(g,{children:l})}),t(N,{kind:n,name:i.name,dateLabel:c,date:i.applyDate,action:t(r,{variant:"statable",state:"reject",size:"medium",onClick:s,children:o}),fields:i.fields,children:e("div",{className:"hub__wager",children:[e("div",{className:"hub__wager-head",children:[t("span",{className:"hub__wager-title",children:h}),e("div",{className:"hub__status-date hub__wager-until",children:[t("span",{children:u}),t("span",{className:"hub__status-dateval",children:i.validUntil})]})]}),i.wagerings.map((a,i)=>e("div",{className:"hub__wager-row",children:[t("span",{className:"hub__wager-label",children:a.label}),e("div",{className:"hub__wager-bar",children:[t(d,{percent:a.percent,showInfo:!1}),t("span",{className:"hub__wager-amt",children:a.done+" / "+a.total})]})]},i))]})})]});export{x as HubActiveBonus,w as HubBonusActivation,f as HubBonusRequest,N as HubStatusCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsxs as a,jsx as e}from"react/jsx-runtime";import{useState as l}from"react";import{Clock as i,Gauge as n,Star as r,Flame as o}from"lucide-react";import s from"../../button/index.js";import d from"../../input/index.js";import m from"../../select/index.js";import c from"../../textarea/index.js";import t from"../../alert/index.js";import h from"../../badge/index.js";import{FieldLabel as p,Field as u,FieldTitle as b}from"../../field/index.js";import{RadioGroup as _}from"../../radio/RadioGroup.js";import{RadioGroupItem as v}from"../../radio/RadioGroupItem.js";import{GetClassNameByPlatform as y}from"../../helpers/classname/GetClassNameByPlatform.js";import{SelectItem as f}from"../../select/SelectItem.js";import{AlertDescription as g}from"../../alert/Description.js";const N=(a,e)=>y(a)+" "+e,k=a=>a.name??a.label,x=a=>{const[e,i]=l(()=>Object.fromEntries(a.map(a=>[k(a),a.value??""])));return[e,(a,e)=>i(l=>({...l,[k(a)]:e}))]},C=({logo:a})=>e("span",{className:"hub__pay-logo",style:{background:a.color},"aria-hidden":!0,children:a.Icon?e(a.Icon,{size:18}):e("b",{children:a.initials})}),z=({options:l,value:i,onChange:n,idPrefix:r,marker:o})=>e(_,{value:i,onValueChange:n,orientation:"horizontal",className:o?N(o,"hub__pay-filter"):"hub__pay-filter",children:l.map(l=>e(p,{htmlFor:r+"-"+l.value,children:a(u,{orientation:"vertical",className:"hub__pay-tile",children:[e("span",{className:"hub__pay-badge",style:{background:l.color},"aria-hidden":!0,children:l.Icon?e(l.Icon,{size:18}):e("b",{children:l.initials})}),e(b,{children:l.label}),e(v,{value:l.value,id:r+"-"+l.value,className:"sr-only"})]})},l.value))}),j=({f:l,onChange:i})=>a("div",{className:"hub__paymodal-field",children:[e("label",{className:"hub__paymodal-label",children:l.label}),"textarea"===l.kind?e(c,{rows:3,defaultValue:l.value,placeholder:l.placeholder,onUpdate:a=>i?.(String(a??""))}):"select"===l.kind?e(m,{size:"x-large",defaultValue:l.value,locked:!!l.locked,onChange:a=>i?.(String(a??"")),children:l.options.map(a=>e(f,{value:a,children:a},a))}):l.locked?e(d,{size:"x-large",value:l.value,locked:!0}):e(d,{size:"x-large",defaultValue:l.value,placeholder:l.placeholder,onChange:a=>i?.(String(a??""))})]}),S=({logo:l,name:i,side:n})=>a("div",{className:"hub__paymodal-card",children:[e(C,{logo:l}),e("span",{className:"hub__paymodal-name",children:i}),n]}),L=({labels:l,values:r})=>e("div",{className:"hub__paymodal-tiles",children:l.map((l,o)=>e("div",{className:"hub__paymodal-tile",children:a("div",{children:[0===o?e(i,{"aria-hidden":!0}):e(n,{"aria-hidden":!0,style:1===o?{transform:"scale(-1, 1)"}:void 0}),a("span",{className:"hub__paymodal-tile-texts",children:[e("span",{className:"hub__paymodal-tile-label",children:l}),e("span",{className:"hub__paymodal-tile-value",children:r[o]})]})]})},l))}),F=({method:i,personFields:n=[],amountLabel:r="Yatırım Miktarı",submitLabel:o="Yatırım Talebi Gönder",favLabel:m="Favorilere Ekle",unfavLabel:c="Favorilerden Kaldır",onSubmit:t,onFavorite:h})=>{const[p,u]=l(!!i.favorite),[b,_]=l(""),[v,y]=x(n);return a("div",{className:"hub__paymodal",children:[e(S,{logo:i.logo,name:i.name,side:e(s,{variant:p?"default":"outline",size:"medium",onClick:()=>{u(!p),h?.(!p)},children:p?c:m})}),e(L,{labels:["Yatırım Süresi","Min Yatırım","Max Yatırım"],values:[i.time,i.min,i.max]}),e("hr",{className:"hub__paymodal-sep"}),a("div",{className:"hub__paymodal-form",children:[n.map(a=>e(j,{f:a,onChange:e=>y(a,e)},a.label)),a("div",{className:"hub__paymodal-field hub__paymodal-amount",children:[e("label",{className:"hub__paymodal-label",children:r}),e(d,{size:"x-large",type:"currency",placeholder:"00.00",addonBefore:e("span",{children:"₺"}),value:b,onChange:a=>_(String(a))})]})]}),e("hr",{className:"hub__paymodal-sep"}),e("div",{className:"hub__paymodal-submit",children:e(s,{variant:"default",size:"large",disabled:!b,onClick:()=>t?.({method:i,amount:b,fields:v}),children:o})})]})},I=({account:i,fields:n=[],amountLabel:r="Çekim Miktarı",submitLabel:o="Çekim Talebi Gönder",note:m,onSubmit:c})=>{const[h,p]=l(""),[u,b]=x(n);return a("div",{className:"hub__paymodal",children:[e(S,{logo:i.logo,name:i.name}),e(L,{labels:["Çekim Süresi","Min Çekim","Max Çekim"],values:[i.time,i.min,i.max]}),e("hr",{className:"hub__paymodal-sep"}),a("div",{className:"hub__paymodal-form",children:[n.map(a=>e(j,{f:a,onChange:e=>b(a,e)},a.label)),a("div",{className:"hub__paymodal-field hub__paymodal-amount",children:[e("label",{className:"hub__paymodal-label",children:r}),e(d,{size:"x-large",type:"currency",placeholder:"00.00",addonBefore:e("span",{children:"₺"}),value:h,onChange:a=>p(String(a))})]}),m&&e(t,{type:"info",variant:"filled",children:e(g,{children:m})})]}),e("hr",{className:"hub__paymodal-sep"}),e("div",{className:"hub__paymodal-submit",children:e(s,{variant:"default",size:"large",disabled:!h,onClick:()=>c?.({account:i,amount:h,fields:u}),children:o})})]})},G=({account:i,accountTypes:n,typeFields:r,personFields:o=[],tcField:m,phoneField:t,nameLabel:h="Çekim Hesabı Adı",descLabel:p="Çekim Hesabı Açıklaması",typeLabel:u="Çekim Hesabı Türü",addLabel:b="Çekim Hesabı Ekle",editLabel:_="Çekim Hesabını Güncelle",onSubmit:v})=>{const y=!!i,[f,g]=l(i?.tags[0]??n[0]?.value??"bank"),[N,k]=l(i?.name??""),[C,L]=l(i?.desc??""),F=n.find(a=>a.value===f)??n[0],I=r[f]??r.default??{pre:[],post:[]},G=a=>y?a:{...a,value:void 0},M=[...I.pre.map(G),...m?[m]:[],...o,...I.post.map(G),...t?[t]:[]],[T,Y]=x(M);return a("div",{className:"hub__paymodal",children:[y&&F?e(S,{logo:{color:F.color,Icon:F.Icon,initials:F.initials},name:F.label}):a("div",{className:"hub__paymodal-field",children:[e("label",{className:"hub__paymodal-label",children:u}),e(z,{options:n,value:f,onChange:g,idPrefix:"acct"})]}),a("div",{className:"hub__paymodal-form",children:[a("div",{className:"hub__paymodal-field",children:[e("label",{className:"hub__paymodal-label",children:h}),e(d,{size:"x-large",value:N,onChange:a=>k(String(a))})]}),a("div",{className:"hub__paymodal-field",children:[e("label",{className:"hub__paymodal-label",children:p}),e(c,{rows:3,value:C,onChange:a=>L("string"==typeof a?a:a?.target?.value??"")})]}),M.map(a=>e(j,{f:a,onChange:e=>Y(a,e)},f+"-"+a.label))]}),e("hr",{className:"hub__paymodal-sep"}),e("div",{className:"hub__paymodal-submit",children:e(s,{variant:"default",size:"large",disabled:!N||!C,onClick:()=>v?.({edit:y,type:f,name:N,desc:C,fields:T}),children:y?_:b})})]})},M=({row:l,favTitle:i="Favori",hotTitle:n="Popüler"})=>"group"===l.type?a("span",{className:"hub__pay-name",children:[e("span",{className:"hub__pay-groupname",children:l.name}),e("span",{children:e(h,{variant:"default",color:"blue",size:"medium",pill:!1,className:"hub__pay-chip",children:l.methodCount+" Yöntem"})})]}):e("span",{className:"hub__pay-name",children:a("span",{className:"hub__pay-title",children:[l.name,l.favorite&&e("i",{className:"hub__pay-mark hub__pay-mark--fav",title:i,children:e(r,{size:9})}),l.popular&&e("i",{className:"hub__pay-mark hub__pay-mark--hot",title:n,children:e(o,{size:9})})]})});export{G as HubAccountModal,F as HubDepositModal,j as HubPayFieldRow,z as HubPayFilter,C as HubPayLogoBadge,S as HubPayModalCard,L as HubPayModalTiles,M as HubPayName,I as HubWithdrawModal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as t,jsx as i}from"react/jsx-runtime";import{useState as a,Fragment as n}from"react";import{
|
|
1
|
+
import{jsxs as e,Fragment as t,jsx as i}from"react/jsx-runtime";import{useState as a,Fragment as n}from"react";import{Search as r,Eye as d}from"lucide-react";import l from"../../button/index.js";import s from"../../badge/index.js";import o from"../../input/index.js";import m from"../../select/index.js";import h from"../../datepicker/index.js";import{Tooltip as c}from"../../tooltip/Tooltip.js";import{TooltipTrigger as p}from"../../tooltip/TooltipTrigger.js";import{TooltipContent as k}from"../../tooltip/TooltipContent.js";import{HubPayFilter as u}from"./cashier.js";import{HubTable as y,HubHistName as g,HubStatusBadge as x,HubDt as w,HubCopyBtn as b}from"./table.js";import{SelectItem as f}from"../../select/SelectItem.js";const I=({cols:t,filters:r,onFilter:d,minPlaceholder:l="Min",maxPlaceholder:s="Maks",startPlaceholder:c="Tarih Başlangıç",endPlaceholder:p="Tarih Bitiş"})=>{const[k,u]=a({}),y=(e,t,i)=>{const a=((e,t)=>e.name??String(t))(e,t),n={...k,[a]:"object"==typeof i&&"object"==typeof k[a]?{...k[a],...i}:i};u(n),d?.(n)};return i("div",{className:"hub__hist-filters hub__hist-filters--"+t,children:r.map((t,a)=>"select"===t.kind?i(m,{size:"x-large",defaultValue:t.options[0],"aria-label":t.ariaLabel,onChange:e=>y(t,a,String(e??"")),children:t.options.map(e=>i(f,{value:e,children:e},e))},a):"minmax"===t.kind?e("div",{className:"hub__hist-minmax",children:[i(o,{size:"x-large",placeholder:l,addonBefore:i("span",{children:"₺"}),onChange:e=>y(t,a,{min:String(e??"")})}),i(o,{size:"x-large",placeholder:s,addonBefore:i("span",{children:"₺"}),onChange:e=>y(t,a,{max:String(e??"")})})]},a):e(n,{children:[i(h,{size:"x-large",placeholder:c,"aria-label":c,onChange:e=>y(t,a,{start:String(e??"")})}),i(h,{size:"x-large",placeholder:p,"aria-label":p,onChange:e=>y(t,a,{end:String(e??"")})})]},a))})},T=({cats:e,idPrefix:t,wide:n})=>{const[r,d]=a(e[0]?.value??"all"),l=i(u,{options:e,value:r,onChange:d,idPrefix:t});return n?i("div",{className:"hub__hist-cats--wide",children:l}):l},v=({children:e})=>i("span",{className:"hub__hist-amount",children:e}),S=({data:a,onFilter:n,cats:r,providers:s,statuses:o,onDetail:m,marker:h={list:"inn-mobile-game-history-list",methods:"inn-mobile-game-history-list-methods",item:"inn-mobile-game-history-list-item"},tokenTitle:c="Fiş",gameTitle:p="Oyun",startTitle:k="Başlangıç",endTitle:u="Bitiş",oldBalTitle:x="Eski Bakiye",newBalTitle:f="Yeni Bakiye",winTitle:S="Kazanma",detailLabel:B="Detay"})=>{const _=[{key:"token",dataIndex:"key",title:c,width:50,render:(e,t)=>i(b,{value:t.key,compact:!0})},{key:"game",dataIndex:"game",title:p,maxWidth:200,render:(e,t)=>i(g,{name:t.game,desc:t.cat})},{key:"start",dataIndex:"start",title:k,width:130,render:e=>i(w,{v:String(e)})},{key:"end",dataIndex:"end",title:u,width:130,render:e=>i(w,{v:String(e)})},{key:"oldBal",dataIndex:"oldBal",title:x,width:130},{key:"newBal",dataIndex:"newBal",title:f,width:130},{key:"win",dataIndex:"win",title:S,width:120,align:"right",render:e=>i(v,{children:String(e)})},{key:"details",dataIndex:"key",title:"",width:100,render:(t,a)=>i("span",{className:"hub__pay-actions",children:e(l,{variant:"solid",size:"medium",onClick:()=>m(a),children:[i(d,{size:13}),B]})})}];return e(t,{children:[i(T,{cats:r,idPrefix:"gh"}),i(I,{onFilter:n,cols:2,filters:[{kind:"select",options:s},{kind:"select",options:o},{kind:"daterange"}]}),i(y,{columns:_,data:a,cellHeight:"54px",marker:h})]})},B=({data:a,onFilter:n,cats:r,methods:d,statuses:l,types:s,marker:o={list:"inn-mobile-payment-history-list",methods:"inn-mobile-payment-history-list-methods",item:"inn-mobile-payment-history-list-item"},idTitle:m="Id",providerTitle:h="Sağlayıcı",statusTitle:c="Durum",dateTitle:p="Tarih",oldBalTitle:k="Eski Bakiye",newBalTitle:u="Yeni Bakiye",amountTitle:f="Miktar"})=>{const S=[{key:"id",dataIndex:"key",title:m,width:50,render:(e,t)=>i(b,{value:t.key,compact:!0})},{key:"name",dataIndex:"name",title:h,maxWidth:200,render:(e,t)=>i(g,{name:t.name,desc:t.sub})},{key:"status",dataIndex:"status",title:c,width:130,render:e=>i(x,{s:String(e)})},{key:"date",dataIndex:"date",title:p,width:130,render:e=>i(w,{v:String(e)})},{key:"oldBal",dataIndex:"oldBal",title:k,width:130},{key:"newBal",dataIndex:"newBal",title:u,width:130},{key:"amount",dataIndex:"amount",title:f,width:120,align:"right",render:e=>i(v,{children:String(e)})}];return e(t,{children:[i(T,{cats:r,idPrefix:"ph"}),i(I,{onFilter:n,cols:3,filters:[{kind:"select",options:d},{kind:"select",options:l},{kind:"select",options:s},{kind:"minmax"},{kind:"daterange"}]}),i(y,{columns:S,data:a,cellHeight:"54px",marker:o})]})},_=({data:a,onFilter:n,cats:r,creators:d,statuses:l,types:s,marker:o={list:"inn-mobile-bonus-history-list",methods:"inn-mobile-bonus-history-list-methods",item:"inn-mobile-bonus-history-list-item"},nameTitle:m="İsim",catTitle:h="Kategori",statusTitle:c="Durum",applyTitle:p="Başvuru Tarihi",finishTitle:k="Tamamlanma",profitTitle:u="Net Kar",cashbackTitle:b="Geri Ödeme",amountTitle:f="Bonus Miktarı",creatorLabel:S="Oluşturan: "})=>{const B=[{key:"name",dataIndex:"name",title:m,maxWidth:200,render:(e,t)=>i(g,{name:t.name,desc:t.sub,creator:t.creator,creatorLabel:S})},{key:"cat",dataIndex:"cat",title:h,width:90},{key:"status",dataIndex:"status",title:c,width:150,render:e=>i(x,{s:String(e)})},{key:"apply",dataIndex:"apply",title:p,width:145,render:e=>i(w,{v:String(e)})},{key:"finish",dataIndex:"finish",title:k,width:145,render:e=>i(w,{v:String(e)})},{key:"profit",dataIndex:"profit",title:u,width:100},{key:"cashback",dataIndex:"cashback",title:b,width:110},{key:"amount",dataIndex:"amount",title:f,width:120,align:"right",render:e=>i(v,{children:String(e)})}];return e(t,{children:[i(T,{cats:r,idPrefix:"bh",wide:!0}),i(I,{onFilter:n,cols:3,filters:[{kind:"select",options:d},{kind:"select",options:l},{kind:"select",options:s},{kind:"minmax"},{kind:"daterange"}]}),i(y,{columns:B,data:a,cellHeight:"54px",marker:o})]})},z=({data:a,onFilter:n,providers:o,statuses:m,onGames:h,marker:u={list:"inn-mobile-free-spin-history-list",methods:"inn-mobile-free-spin-history-list-methods",item:"inn-mobile-free-spin-history-list-item"},idTitle:f="Id",providerTitle:T="Sağlayıcı",winTitle:S="Kazanç",statusTitle:B="Durum",gamesTitle:_="Oyun Sayısı",spinsTitle:z="Spin Sayısı",startTitle:j="Başlangıç",endTitle:C="Bitiş",gamesTooltip:F="Free Spin Oyunları",viewGamesLabel:P="Geçerli Oyunları Görüntüle"})=>{const N=[{key:"id",dataIndex:"key",title:f,width:50,render:(e,t)=>i(b,{value:t.key,compact:!0})},{key:"provider",dataIndex:"provider",title:T,maxWidth:200,render:(e,t)=>i(g,{name:t.provider})},{key:"status",dataIndex:"status",title:S,width:140,render:e=>i(x,{s:String(e)})},{key:"games",dataIndex:"games",title:_,width:120,render:(t,a)=>e("span",{className:"hub__hist-count",children:[i(s,{variant:"default",color:"blue",size:"medium",pill:!1,children:String(t)}),e(c,{children:[i(p,{asChild:!0,children:i(l,{variant:"ghost",size:"icon-sm","aria-label":F,onClick:()=>h(a),children:i(d,{size:13})})}),i(k,{placement:"top",children:F})]})]})},{key:"spins",dataIndex:"spins",title:z,width:110,render:e=>i(s,{variant:"default",color:"blue",size:"medium",pill:!1,children:String(e)})},{key:"start",dataIndex:"start",title:j,width:145,render:e=>i(w,{v:String(e)})},{key:"end",dataIndex:"end",title:C,width:145,render:e=>i(w,{v:String(e)})},{key:"won",dataIndex:"won",title:S,width:110,align:"right",render:e=>i(v,{children:String(e)})}],D=[{key:"id",dataIndex:"key",title:f,width:50,render:(e,t)=>i(b,{value:t.key,compact:!0})},{key:"provider",dataIndex:"provider",title:T,maxWidth:200,render:(e,t)=>i(g,{name:t.provider})},{key:"status",dataIndex:"status",title:B,width:140,render:e=>i(x,{s:String(e)})},{key:"games",dataIndex:"games",title:_,width:120,render:e=>i(v,{children:String(e)})},{key:"spins",dataIndex:"spins",title:z,width:110,render:e=>i(s,{variant:"default",color:"blue",size:"medium",pill:!1,children:String(e)})},{key:"start",dataIndex:"start",title:j,width:145,render:e=>i(w,{v:String(e)})},{key:"end",dataIndex:"end",title:C,width:145,render:e=>i(w,{v:String(e)})},{key:"won",dataIndex:"won",title:S,width:110,render:e=>i(v,{children:String(e)})},{key:"actions",dataIndex:"key",title:"",width:220,render:(t,a)=>i("span",{className:"hub__pay-actions hub__pay-actions--full",children:e(l,{variant:"solid",size:"medium",onClick:()=>h(a),children:[i(r,{size:14}),P]})})}];return e(t,{children:[i(I,{onFilter:n,cols:4,filters:[{kind:"select",options:o},{kind:"select",options:m},{kind:"daterange"}]}),i(y,{columns:N,mobileColumns:D,data:a,cellHeight:"54px",marker:u})]})};export{_ as HubBonusHistory,z as HubFreespinHistory,S as HubGameHistory,B as HubPaymentHistory};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as a,jsx as l}from"react/jsx-runtime";import{useState as i}from"react";import{Crown as n,Medal as r,TrendingUp as s,Gamepad2 as d,Folder as t,Trophy as c,FileQuestion as h,User as m,ChevronRight as o,Info as u}from"lucide-react";import _ from"../../button/index.js";import b from"../../progress/index.js";import p from"../../select/index.js";import v from"../../table/index.js";import{Avatar as g}from"../../avatar/index.js";import{HoverCard as N}from"../../hovercard/HoverCard.js";import{HoverCardTrigger as f}from"../../hovercard/HoverCardTrigger.js";import{HoverCardContent as y}from"../../hovercard/HoverCardContent.js";import{Sheet as w,SheetTrigger as k,SheetContent as x,SheetHeader as L,SheetTitle as C}from"../../dialog/Dialog.js";import{SelectItem as T}from"../../select/SelectItem.js";const S=({Icon:a})=>l("span",{className:"hub__medal-shape","aria-hidden":!0,children:e("span",{className:"hub__medal-hexwrap",children:[e("svg",{className:"hub__medal-hexsvg",viewBox:"0 0 48 54",children:[l("defs",{children:e("linearGradient",{id:"hub-gold",x1:"0",y1:"0",x2:"1",y2:"1",children:[l("stop",{offset:"0",stopColor:"#ffd54d"}),l("stop",{offset:"0.55",stopColor:"#f1ab00"}),l("stop",{offset:"1",stopColor:"#d98e00"})]})}),l("path",{d:"M28.3 3.55 L41.7 11.45 Q46 14 46 19 L46 35 Q46 40 41.7 42.55 L28.3 50.45 Q24 53 19.7 50.45 L6.3 42.55 Q2 40 2 35 L2 19 Q2 14 6.3 11.45 L19.7 3.55 Q24 1 28.3 3.55 Z",fill:"url(#hub-gold)"})]}),l("span",{className:"hub__medal-glyph",children:l(a,{})})]})}),j=({medal:a,onOpen:i})=>e("button",{type:"button",className:"hub__medal"+(a.locked?" hub__medal--locked":""),onClick:()=>i(a),children:[l("span",{className:"hub__medal-visual",children:l(S,{Icon:a.Icon})}),e("span",{className:"hub__medal-bottom",children:[l("span",{className:"hub__medal-name",children:a.name}),l("span",{className:"hub__medal-countwrap",children:e("span",{className:"hub__medal-count",children:[l(m,{"aria-hidden":!0}),a.count]})})]})]}),z=({medal:a,durationLabel:i="Süre",quantityLabel:n="Miktar",earnersLabel:r="Hakeden Sayısı"})=>e("div",{className:"hub__medal-detail",children:[l("span",{className:"hub__medal-visual",children:l(S,{Icon:a.Icon})}),l("div",{className:"hub__medal-detail-name",children:a.name}),l("p",{className:"hub__medal-detail-desc",children:a.description}),e("dl",{className:"hub__medal-detail-rows",children:[e("div",{children:[l("dt",{children:i}),l("dd",{children:a.duration})]}),e("div",{children:[l("dt",{children:n}),l("dd",{children:a.quantity})]}),e("div",{children:[l("dt",{children:r}),l("dd",{children:a.count})]})]})]}),I=({marker:a,icon:i,title:n,titleExtra:r,action:s,children:d})=>e("section",{className:a?a+" hub__box":"hub__box",children:[e("div",{className:"inn-sub-page-header hub__box-head",children:[e("span",{className:"hub__box-title",children:[i,n,r]}),s]}),l("hr",{className:"hub__hairline"}),d]}),O=({stats:a})=>l("div",{className:"hub__stats",children:a.map((a,i)=>e("div",{className:"hub__stat",children:[l("div",{className:"hub__stat-label",children:a.label}),l("div",{className:"hub__stat-value",children:a.value})]},i))}),D=({label:a,onClick:i})=>e(_,{variant:"link",size:"x-small",className:"hub__details",onClick:i,children:[a,l(o,{"aria-hidden":!0})]}),K=({user:i,vip:c,medals:h,stats:m,topSlots:o,onMedalOpen:u,onVipClub:p,onMedalsDetail:v,onStatsDetail:N,vipClubLabel:f="VIP Klübü",medalsTitle:y="Madalyalar",statsTitle:w="İstatistikler",topSlotsTitle:k="En Çok Oynadığınız Slot Oyunları",liveTitle:x="En Çok Oynadığınız Canlı Casino Oyunları",detailsLabel:L="Detaylar",cevrimLabel:C="Çevrim",noDataLabel:T="Veri Yok"})=>e(a,{children:[e("div",{className:"inn-user-profile-summary hub__profile hub__profile--user",children:[i.avatar??l(g,{className:"hub__avatar hub__avatar--user","aria-hidden":!0}),e("div",{children:[l("div",{className:"hub__username",children:i.username}),null!=i.fullname&&l("div",{className:"hub__fullname",children:i.fullname})]})]}),e("section",{className:"inn-vip-level-summary hub__vip",children:[e("div",{className:"hub__vip-head",children:[e("div",{className:"hub__vip-meta",children:[l("div",{className:"inn-vip-level-title hub__vip-title",children:c.title}),l("span",{className:"hub__vip-dp",children:c.dp})]}),e(_,{size:"small",className:"hub__vip-btn",onClick:p,children:[l(n,{"aria-hidden":!0}),f]})]}),e("div",{className:"inn-vip-level-progress hub__vip-progress",children:[l(b,{percent:c.percent,showInfo:!1,status:"success"}),l("span",{className:"hub__vip-next",children:c.nextText})]})]}),l(I,{marker:"inn-medals-summary-box",icon:l(r,{"aria-hidden":!0}),title:y,action:l(D,{label:L,onClick:v}),children:l("div",{className:"inn-medals-summary hub__medals",children:h.slice(0,8).map(e=>l(j,{medal:e,onOpen:u},e.name))})}),l(I,{icon:l(s,{"aria-hidden":!0}),title:w,action:l(D,{label:L,onClick:N}),children:l(O,{stats:m})}),l(I,{marker:"inn-favorite-casino-games-summary-box",icon:l(d,{"aria-hidden":!0}),title:k,children:l("div",{className:"inn-favorite-casino-games-summary hub__games",children:o.map(a=>e("div",{className:"hub__game",children:[l("span",{className:"hub__game-art hub__game-art--"+a.art,"aria-hidden":!0,children:a.emoji}),e("div",{className:"hub__game-info",children:[l("div",{className:"hub__game-name",children:a.name}),e("div",{children:[l("div",{className:"hub__game-amount",children:a.amount}),l("div",{className:"hub__game-cur",children:C})]})]})]},a.name))})}),l(I,{marker:"inn-favorite-live-casino-games-summary-box",icon:l(d,{"aria-hidden":!0}),title:x,children:l("div",{className:"inn-favorite-live-casino-games-summary hub__games",children:[1,2,3].map(a=>e("div",{className:"hub__game hub__game--empty",children:[l(t,{"aria-hidden":!0}),l("span",{className:"hub__empty-text",children:T})]},a))})})]}),M=({tips:a,unitLabel:i="madalya:",winLabel:n="ödül kazan"})=>l("div",{className:"hub__reward-tips",children:a.map(([a,r],s)=>e("span",{className:"hub__reward-tip",children:[a," ",i," ",l("b",{children:r})," ",n]},s))}),Q=({tips:i,sheetTitle:n,unitLabel:r,winLabel:s})=>e(a,{children:[l("span",{className:"hub__reward-info hub__reward-info--hover",children:e(N,{children:[l(f,{children:l(u,{"aria-hidden":!0,className:"hub__reward-info-icon"})}),l(y,{variant:"filled",children:l(M,{tips:i,unitLabel:r,winLabel:s})})]})}),l("span",{className:"hub__reward-info hub__reward-info--sheet",children:e(w,{children:[l(k,{asChild:!0,children:l("button",{type:"button",className:"hub__reward-info-btn","aria-label":"string"==typeof n?n:void 0,children:l(u,{"aria-hidden":!0,className:"hub__reward-info-icon"})})}),e(x,{side:"bottom",children:[l(L,{children:l(C,{children:n})}),l(M,{tips:i,unitLabel:r,winLabel:s})]})]})})]}),E=e=>{const a=e.currentTarget.querySelector(".hub__reward-art");a&&(a.classList.add("shake"),a.addEventListener("animationend",()=>a.classList.remove("shake"),{once:!0}))},H=({medals:i,rewardTiers:n,rewardTips:s,rewardPercent:d=10,onMedalOpen:t,rewardsTitle:h="Ödüller",rewardsSheetTitle:m="Ödül Detayları",rewardUnitLabel:o="madalya:",rewardWinLabel:u="ödül kazan",earnedTitle:_="Kazançlarınız",earnedCountText:p="2 / 20 Hakedildi",awaitingTitle:v="Kilidi Açılması Bekleyenler"})=>e(a,{children:[e(I,{icon:l(c,{"aria-hidden":!0}),title:h,titleExtra:l(Q,{tips:s,sheetTitle:m,unitLabel:o,winLabel:u}),children:[l("div",{className:"hub__rewards",children:n.map(({label:a,emoji:i,lockable:n})=>e("div",{className:"hub__reward"+(n?" hub__reward--lockable":""),...n?{onClick:E}:{},children:[l("span",{className:"hub__reward-art","aria-hidden":!0,children:i}),l("span",{className:"hub__reward-label",children:a})]},a))}),l("div",{className:"hub__rewards-progress",children:l(b,{percent:d,showInfo:!1,status:"success"})})]}),l(I,{marker:"inn-completed-medals",icon:l(r,{"aria-hidden":!0}),title:_,action:l("span",{className:"hub__box-count",children:p}),children:l("div",{className:"hub__medals hub__medals--wrap",children:i.filter(e=>!e.locked).map(e=>l(j,{medal:e,onOpen:t},e.name))})}),l(I,{marker:"inn-awaiting-unlocking-medals",icon:l(r,{"aria-hidden":!0}),title:v,children:l("div",{className:"hub__medals hub__medals--wrap",children:i.filter(e=>e.locked).map(e=>l(j,{medal:e,onOpen:t},e.name))})})]}),P="__all__",B=(e,a)=>{const l=(Array.isArray(e)?e:[e]).filter(e=>"string"==typeof e&&""!==e);if(0===l.length)return[P];const i=a.includes(P),n=l.includes(P);return n&&!i?[P]:n&&l.length>1?l.filter(e=>e!==P):l},V=({gameStats:n,categories:r,providers:d,stats:t,gameTitle:c="Oyun",winTitle:m="Kazanma",betTitle:o="Bahis",wageredTitle:u="Çevrim",statsTitle:_="İstatistikler",categoryPlaceholder:b="Tüm Kategoriler",providerPlaceholder:g="Tüm Sağlayıcılar",gamePlaceholder:N="Tüm Oyunlar",selectionLabel:f="Seçim",casinoRelabel:y="Slotlar",noDataLabel:w="Veri Yok",onStatsFilter:k})=>{const[x,L]=i(""),[C,S]=i([P]),[j,z]=i([P]),D=n.filter(e=>(!x||e.category===x)&&(C.includes(P)||C.includes(e.provider))&&(j.includes(P)||j.includes(e.game))),K=e=>k?.({category:x,providers:C,games:j,...e}),M=[{dataIndex:"game",key:"game",title:c,render:(a,i)=>e("span",{className:"hub__cell-game",children:[l("span",{className:"hub__cell-big",children:String(a)}),l("span",{className:"hub__cell-sub",children:i.category+" / "+i.provider})]})},{dataIndex:"win",key:"win",title:m,render:e=>l("span",{className:"hub__cell-big",children:String(e)})},{dataIndex:"bet",key:"bet",title:o,render:e=>l("span",{className:"hub__cell-big",children:String(e)})},{dataIndex:"wagered",key:"wagered",title:u,width:"120px",render:e=>l("span",{className:"hub__cell-big hub__cell-cur",children:String(e)})}];return e(a,{children:[e("div",{className:"hub__filterbar",children:[e(p,{size:"x-large",placeholder:b,value:x,onChange:e=>{const a=e?String(e):"";L(a),K({category:a})},"aria-label":"Kategori",children:[l(T,{value:"",children:b}),r.map(e=>l(T,{value:e,children:"Casino"===e?y:e},e))]}),e(p,{size:"x-large",multi:!0,placeholder:g,"aria-label":"Sağlayıcı",value:C,label:C.includes(P)?void 0:f+" ("+C.length+")",onChange:e=>{const a=B(e,C);S(a),K({providers:a})},children:[l(T,{value:P,children:g}),d.map(e=>l(T,{value:e,children:e},e))]}),e(p,{size:"x-large",multi:!0,placeholder:N,"aria-label":"Oyun",value:j,label:j.includes(P)?void 0:f+" ("+j.length+")",onChange:e=>{const a=B(e,j);z(a),K({games:a})},children:[l(T,{value:P,children:N}),n.map(e=>l(T,{value:e.game,children:e.game},e.key))]})]}),l(I,{icon:l(s,{"aria-hidden":!0}),title:_,children:l(O,{stats:t})}),l("section",{className:"inn-statistics-game-stats-table hub__box hub__box--flush hub__stat-table",children:D.length>0?l(v,{columns:M,data:D,size:"medium",headerBg:!1}):e("div",{className:"hub__nodata",children:[l(h,{"aria-hidden":!0}),l("span",{className:"hub__empty-text",children:w})]})})]})};export{j as HubMedalButton,z as HubMedalDetail,H as HubMedals,K as HubProfileSummary,V as HubStatistics};
|
|
1
|
+
import{jsxs as e,jsx as a,Fragment as l}from"react/jsx-runtime";import{useState as i}from"react";import{User as n,Trophy as r,Medal as s,Crown as d,TrendingUp as t,Gamepad2 as c,Folder as h,FileQuestion as m,Info as o,ChevronRight as u}from"lucide-react";import _ from"../../button/index.js";import b from"../../progress/index.js";import p from"../../select/index.js";import v from"../../table/index.js";import{Avatar as g}from"../../avatar/index.js";import{HoverCard as N}from"../../hovercard/HoverCard.js";import{HoverCardTrigger as f}from"../../hovercard/HoverCardTrigger.js";import{HoverCardContent as y}from"../../hovercard/HoverCardContent.js";import{Sheet as w,SheetTrigger as k,SheetContent as x,SheetHeader as L,SheetTitle as C}from"../../dialog/Dialog.js";import{SelectItem as T}from"../../select/SelectItem.js";const S=({Icon:l})=>a("span",{className:"hub__medal-shape","aria-hidden":!0,children:e("span",{className:"hub__medal-hexwrap",children:[e("svg",{className:"hub__medal-hexsvg",viewBox:"0 0 48 54",children:[a("defs",{children:e("linearGradient",{id:"hub-gold",x1:"0",y1:"0",x2:"1",y2:"1",children:[a("stop",{offset:"0",stopColor:"#ffd54d"}),a("stop",{offset:"0.55",stopColor:"#f1ab00"}),a("stop",{offset:"1",stopColor:"#d98e00"})]})}),a("path",{d:"M28.3 3.55 L41.7 11.45 Q46 14 46 19 L46 35 Q46 40 41.7 42.55 L28.3 50.45 Q24 53 19.7 50.45 L6.3 42.55 Q2 40 2 35 L2 19 Q2 14 6.3 11.45 L19.7 3.55 Q24 1 28.3 3.55 Z",fill:"url(#hub-gold)"})]}),a("span",{className:"hub__medal-glyph",children:a(l,{})})]})}),j=({medal:l,onOpen:i})=>e("button",{type:"button",className:"hub__medal"+(l.locked?" hub__medal--locked":""),onClick:()=>i(l),children:[a("span",{className:"hub__medal-visual",children:a(S,{Icon:l.Icon})}),e("span",{className:"hub__medal-bottom",children:[a("span",{className:"hub__medal-name",children:l.name}),a("span",{className:"hub__medal-countwrap",children:e("span",{className:"hub__medal-count",children:[a(n,{"aria-hidden":!0}),l.count]})})]})]}),z=({medal:l,durationLabel:i="Süre",quantityLabel:n="Miktar",earnersLabel:r="Hakeden Sayısı"})=>e("div",{className:"hub__medal-detail",children:[a("span",{className:"hub__medal-visual",children:a(S,{Icon:l.Icon})}),a("div",{className:"hub__medal-detail-name",children:l.name}),a("p",{className:"hub__medal-detail-desc",children:l.description}),e("dl",{className:"hub__medal-detail-rows",children:[e("div",{children:[a("dt",{children:i}),a("dd",{children:l.duration})]}),e("div",{children:[a("dt",{children:n}),a("dd",{children:l.quantity})]}),e("div",{children:[a("dt",{children:r}),a("dd",{children:l.count})]})]})]}),I=({marker:l,icon:i,title:n,titleExtra:r,action:s,children:d})=>e("section",{className:l?l+" hub__box":"hub__box",children:[e("div",{className:"inn-sub-page-header hub__box-head",children:[e("span",{className:"hub__box-title",children:[i,n,r]}),s]}),a("hr",{className:"hub__hairline"}),d]}),O=({stats:l})=>a("div",{className:"hub__stats inn-statistics-summary",children:l.map((l,i)=>e("div",{className:"hub__stat",children:[a("div",{className:"hub__stat-label",children:l.label}),a("div",{className:"hub__stat-value",children:l.value})]},i))}),D=({label:l,onClick:i})=>e(_,{variant:"link",size:"x-small",className:"hub__details",onClick:i,children:[l,a(u,{"aria-hidden":!0})]}),K=({user:i,vip:n,medals:r,stats:m,topSlots:o,onMedalOpen:u,onVipClub:p,onMedalsDetail:v,onStatsDetail:N,vipClubLabel:f="VIP Klübü",medalsTitle:y="Madalyalar",statsTitle:w="İstatistikler",topSlotsTitle:k="En Çok Oynadığınız Slot Oyunları",liveTitle:x="En Çok Oynadığınız Canlı Casino Oyunları",detailsLabel:L="Detaylar",cevrimLabel:C="Çevrim",noDataLabel:T="Veri Yok"})=>e(l,{children:[e("div",{className:"inn-user-profile-summary hub__profile hub__profile--user",children:[i.avatar??a(g,{className:"hub__avatar hub__avatar--user","aria-hidden":!0}),e("div",{children:[a("div",{className:"hub__username",children:i.username}),null!=i.fullname&&a("div",{className:"hub__fullname",children:i.fullname})]})]}),e("section",{className:"inn-vip-level-summary hub__vip",children:[e("div",{className:"hub__vip-head",children:[e("div",{className:"hub__vip-meta",children:[a("div",{className:"inn-vip-level-title hub__vip-title",children:n.title}),a("span",{className:"hub__vip-dp",children:n.dp})]}),e(_,{size:"small",className:"hub__vip-btn",onClick:p,children:[a(d,{"aria-hidden":!0}),f]})]}),e("div",{className:"inn-vip-level-progress hub__vip-progress",children:[a(b,{percent:n.percent,showInfo:!1,status:"success"}),a("span",{className:"hub__vip-next",children:n.nextText})]})]}),a(I,{marker:"inn-medals-summary-box",icon:a(s,{"aria-hidden":!0}),title:y,action:a(D,{label:L,onClick:v}),children:a("div",{className:"inn-medals-summary hub__medals",children:r.slice(0,8).map(e=>a(j,{medal:e,onOpen:u},e.name))})}),a(I,{icon:a(t,{"aria-hidden":!0}),title:w,action:a(D,{label:L,onClick:N}),children:a(O,{stats:m})}),a(I,{marker:"inn-favorite-casino-games-summary-box",icon:a(c,{"aria-hidden":!0}),title:k,children:a("div",{className:"inn-favorite-casino-games-summary hub__games",children:o.map(l=>e("div",{className:"hub__game",children:[a("span",{className:"hub__game-art hub__game-art--"+l.art,"aria-hidden":!0,children:l.emoji}),e("div",{className:"hub__game-info",children:[a("div",{className:"hub__game-name",children:l.name}),e("div",{children:[a("div",{className:"hub__game-amount",children:l.amount}),a("div",{className:"hub__game-cur",children:C})]})]})]},l.name))})}),a(I,{marker:"inn-favorite-live-casino-games-summary-box",icon:a(c,{"aria-hidden":!0}),title:x,children:a("div",{className:"inn-favorite-live-casino-games-summary hub__games",children:[1,2,3].map(l=>e("div",{className:"hub__game hub__game--empty",children:[a(h,{"aria-hidden":!0}),a("span",{className:"hub__empty-text",children:T})]},l))})})]}),M=({tips:l,unitLabel:i="madalya:",winLabel:n="ödül kazan"})=>a("div",{className:"hub__reward-tips",children:l.map(([l,r],s)=>e("span",{className:"hub__reward-tip",children:[l," ",i," ",a("b",{children:r})," ",n]},s))}),Q=({tips:i,sheetTitle:n,unitLabel:r,winLabel:s})=>e(l,{children:[a("span",{className:"hub__reward-info hub__reward-info--hover",children:e(N,{children:[a(f,{children:a(o,{"aria-hidden":!0,className:"hub__reward-info-icon"})}),a(y,{variant:"filled",children:a(M,{tips:i,unitLabel:r,winLabel:s})})]})}),a("span",{className:"hub__reward-info hub__reward-info--sheet",children:e(w,{children:[a(k,{asChild:!0,children:a("button",{type:"button",className:"hub__reward-info-btn","aria-label":"string"==typeof n?n:void 0,children:a(o,{"aria-hidden":!0,className:"hub__reward-info-icon"})})}),e(x,{side:"bottom",children:[a(L,{children:a(C,{children:n})}),a(M,{tips:i,unitLabel:r,winLabel:s})]})]})})]}),E=e=>{const a=e.currentTarget.querySelector(".hub__reward-art");a&&(a.classList.add("shake"),a.addEventListener("animationend",()=>a.classList.remove("shake"),{once:!0}))},H=({medals:i,rewardTiers:n,rewardTips:d,rewardPercent:t=10,onMedalOpen:c,rewardsTitle:h="Ödüller",rewardsSheetTitle:m="Ödül Detayları",rewardUnitLabel:o="madalya:",rewardWinLabel:u="ödül kazan",earnedTitle:_="Kazançlarınız",earnedCountText:p="2 / 20 Hakedildi",awaitingTitle:v="Kilidi Açılması Bekleyenler"})=>e(l,{children:[e(I,{icon:a(r,{"aria-hidden":!0}),title:h,titleExtra:a(Q,{tips:d,sheetTitle:m,unitLabel:o,winLabel:u}),children:[a("div",{className:"hub__rewards",children:n.map(({label:l,emoji:i,lockable:n})=>e("div",{className:"hub__reward"+(n?" hub__reward--lockable":""),...n?{onClick:E}:{},children:[a("span",{className:"hub__reward-art","aria-hidden":!0,children:i}),a("span",{className:"hub__reward-label",children:l})]},l))}),a("div",{className:"hub__rewards-progress",children:a(b,{percent:t,showInfo:!1,status:"success"})})]}),a(I,{marker:"inn-completed-medals",icon:a(s,{"aria-hidden":!0}),title:_,action:a("span",{className:"hub__box-count",children:p}),children:a("div",{className:"hub__medals hub__medals--wrap",children:i.filter(e=>!e.locked).map(e=>a(j,{medal:e,onOpen:c},e.name))})}),a(I,{marker:"inn-awaiting-unlocking-medals",icon:a(s,{"aria-hidden":!0}),title:v,children:a("div",{className:"hub__medals hub__medals--wrap",children:i.filter(e=>e.locked).map(e=>a(j,{medal:e,onOpen:c},e.name))})})]}),P="__all__",B=(e,a)=>{const l=(Array.isArray(e)?e:[e]).filter(e=>"string"==typeof e&&""!==e);if(0===l.length)return[P];const i=a.includes(P),n=l.includes(P);return n&&!i?[P]:n&&l.length>1?l.filter(e=>e!==P):l},V=({gameStats:n,categories:r,providers:s,stats:d,gameTitle:c="Oyun",winTitle:h="Kazanma",betTitle:o="Bahis",wageredTitle:u="Çevrim",statsTitle:_="İstatistikler",categoryPlaceholder:b="Tüm Kategoriler",providerPlaceholder:g="Tüm Sağlayıcılar",gamePlaceholder:N="Tüm Oyunlar",selectionLabel:f="Seçim",casinoRelabel:y="Slotlar",noDataLabel:w="Veri Yok",onStatsFilter:k})=>{const[x,L]=i(""),[C,S]=i([P]),[j,z]=i([P]),D=n.filter(e=>(!x||e.category===x)&&(C.includes(P)||C.includes(e.provider))&&(j.includes(P)||j.includes(e.game))),K=e=>k?.({category:x,providers:C,games:j,...e}),M=[{dataIndex:"game",key:"game",title:c,render:(l,i)=>e("span",{className:"hub__cell-game",children:[a("span",{className:"hub__cell-big",children:String(l)}),a("span",{className:"hub__cell-sub",children:i.category+" / "+i.provider})]})},{dataIndex:"win",key:"win",title:h,render:e=>a("span",{className:"hub__cell-big",children:String(e)})},{dataIndex:"bet",key:"bet",title:o,render:e=>a("span",{className:"hub__cell-big",children:String(e)})},{dataIndex:"wagered",key:"wagered",title:u,width:"120px",render:e=>a("span",{className:"hub__cell-big hub__cell-cur",children:String(e)})}];return e(l,{children:[e("div",{className:"hub__filterbar",children:[e(p,{size:"x-large",placeholder:b,value:x,onChange:e=>{const a=e?String(e):"";L(a),K({category:a})},"aria-label":"Kategori",children:[a(T,{value:"",children:b}),r.map(e=>a(T,{value:e,children:"Casino"===e?y:e},e))]}),e(p,{size:"x-large",multi:!0,placeholder:g,"aria-label":"Sağlayıcı",value:C,label:C.includes(P)?void 0:f+" ("+C.length+")",onChange:e=>{const a=B(e,C);S(a),K({providers:a})},children:[a(T,{value:P,children:g}),s.map(e=>a(T,{value:e,children:e},e))]}),e(p,{size:"x-large",multi:!0,placeholder:N,"aria-label":"Oyun",value:j,label:j.includes(P)?void 0:f+" ("+j.length+")",onChange:e=>{const a=B(e,j);z(a),K({games:a})},children:[a(T,{value:P,children:N}),n.map(e=>a(T,{value:e.game,children:e.game},e.key))]})]}),a(I,{icon:a(t,{"aria-hidden":!0}),title:_,children:a(O,{stats:d})}),a("section",{className:"inn-statistics-game-stats-table hub__box hub__box--flush hub__stat-table",children:D.length>0?a(v,{columns:M,data:D,size:"medium",headerBg:!1}):e("div",{className:"hub__nodata",children:[a(m,{"aria-hidden":!0}),a("span",{className:"hub__empty-text",children:w})]})})]})};export{j as HubMedalButton,z as HubMedalDetail,H as HubMedals,K as HubProfileSummary,V as HubStatistics};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsxs as e,Fragment as i,jsx as t}from"react/jsx-runtime";import{useState as a}from"react";import{ImageOff as n,Clock as l}from"lucide-react";import s from"../../button/index.js";import r from"../../badge/index.js";import d from"../../alert/index.js";import{Tooltip as c}from"../../tooltip/Tooltip.js";import{TooltipTrigger as m}from"../../tooltip/TooltipTrigger.js";import{TooltipContent as h}from"../../tooltip/TooltipContent.js";import{HubTable as o,HubCopyBtn as p,HubStatusBadge as u,HubDt as b}from"./table.js";import{AlertDescription as k}from"../../alert/Description.js";const _=({children:e})=>e?t(d,{type:"info",variant:"filled",children:t(k,{children:e})}):null,f=({start:i,end:a})=>e("span",{className:"hub__fsact-se",children:[t("span",{children:i}),t("span",{children:a})]}),y=({data:a,intro:n,onGames:r,marker:d={desktop:"inn-free-spin-activation-table",list:"inn-mobile-free-spin-activation-list",methods:"inn-mobile-free-spin-activation-list-items",item:"inn-mobile-freespin-activation-list-item"},idTitle:b="Id",brandTitle:k="Sağlayıcı Adı",datesTitle:y="Başlangıç / Bitiş",statusTitle:v="Durum",spinsTitle:T="Spin Sayısı",daysTitle:x="Geçerlilik",daysSuffix:N=" Gün",createdLabel:z="Oluşturulma Tarihi: ",viewGamesLabel:g="Oyunları Görüntüle"})=>{const I=[{key:"id",dataIndex:"key",title:b,width:44,render:(e,i)=>t(p,{value:i.key,compact:!0})},{key:"brand",dataIndex:"brand",title:k,maxWidth:460,render:(i,a)=>t("span",{className:"hub__pay-name hub__hist-nm",children:e("span",{className:"hub__bonus-name",children:[t("span",{className:"hub__bonus-title",children:a.brand}),e(c,{children:[t(m,{asChild:!0,children:t("i",{className:"hub__hist-creator","aria-label":z,children:t(l,{size:13})})}),t(h,{placement:"top",children:z+a.created})]})]})})},{key:"dates",dataIndex:"start",title:y,maxWidth:170,render:(e,i)=>t(f,{start:i.start,end:i.end})},{key:"status",dataIndex:"status",title:v,width:120,render:e=>t(u,{s:String(e)})},{key:"spins",dataIndex:"spins",title:T,width:90,render:e=>t("span",{className:"hub__fsact-num",children:String(e)})},{key:"days",dataIndex:"days",title:x,width:95,render:e=>t("span",{className:"hub__fsact-num",children:String(e)+N})},{key:"actions",dataIndex:"key",title:"",maxWidth:200,render:(e,i)=>t("span",{className:"hub__pay-actions",children:t(s,{variant:"default",size:"medium",onClick:()=>r(i),children:g})})}];return e(i,{children:[t(_,{children:n}),t(o,{columns:I,data:a,cellHeight:"84px",marker:d})]})},v=({name:i})=>e(c,{children:[t(m,{asChild:!0,children:t("span",{className:"hub__pay-name hub__hist-nm",children:t("span",{className:"hub__hist-name",children:i})})}),t(h,{placement:"top",children:i})]}),T={"Teslim Edildi":"success","Onay Bekliyor":"default",Reddedildi:"purple","Ulaşılamadı":"danger"},x=({s:e,tone:i=T})=>t(r,{variant:"default",color:i[e]??"default",size:"small",pill:!1,children:e}),N=({tickets:i})=>t("div",{className:"hub__tickets",children:i.map(i=>e("div",{className:"hub__ticket",children:[t("span",{children:i}),t(p,{value:i,compact:!0})]},i))}),z=({prizes:i,mainLabel:l="Asıl",reserveLabel:s="Yedek",emptyText:r="Bu listede bilet bulunmuyor.",reserveOrderLabel:d="Yedek Sırası:",ticketLabel:c="Bilet:",tone:m=T})=>{const[h,o]=a("main"),u=i.filter(e=>"reserve"===h?!!e.reserve:!e.reserve);return e("div",{className:"hub__prizes",children:[e("div",{className:"hub__prize-tabs",children:[t("button",{type:"button",className:"main"===h?"is-active":"",onClick:()=>o("main"),children:l}),t("button",{type:"button",className:"reserve"===h?"is-active":"",onClick:()=>o("reserve"),children:s})]}),0===u.length?t("div",{className:"hub__prize-empty",children:r}):t("div",{className:"hub__prize-list",children:u.map((i,a)=>e("div",{className:"hub__prize",children:[t("span",{className:"hub__prize-img",children:t(n,{size:22})}),e("div",{className:"hub__prize-body",children:[t("h4",{className:"hub__prize-title",children:i.name}),t("span",{children:t(x,{s:i.status,tone:m})}),i.reserve&&e("span",{className:"hub__prize-reserve",children:[t("b",{children:d})," ",(i.reserveOrder??0)+1]}),e("span",{className:"hub__prize-ticket",children:[t("b",{children:c}),t("span",{className:"hub__prize-code",children:i.ticket}),t(p,{value:i.ticket,compact:!0})]})]})]},i.ticket+"-"+a))})]})},g=(e,i,a,n,l,s)=>[{key:"id",dataIndex:"key",title:e,width:44,render:(e,i)=>t(p,{value:i.key,compact:!0})},{key:"name",dataIndex:"name",title:i,maxWidth:460,render:(e,i)=>t(v,{name:i.name})},{key:"start",dataIndex:"start",title:a,width:130,render:e=>t(b,{v:String(e)})},{key:"end",dataIndex:"end",title:n,width:130,render:e=>t(b,{v:String(e)})},{key:"status",dataIndex:"status",title:l,width:150,render:e=>t(u,{s:String(e)})},{key:"tickets",dataIndex:"tickets",title:s,width:110,render:(e,i)=>t("span",{className:"hub__fsact-num",children:i.tickets.length})}],I={idTitle:"Id",nameTitle:"İsim",startTitle:"Başlangıç",endTitle:"Bitiş",statusTitle:"Durum",ticketsTitle:"Bilet Sayısı"},j=({data:a,intro:n,onTickets:l,onDeposit:r,marker:d={desktop:"inn-active-raffles-table",list:"inn-mobile-active-raffles-list",methods:"inn-mobile-active-raffles-list-items",item:"inn-mobile-active-raffles-list-item"},ticketsLabel:c="Biletlerim",depositLabel:m="Yatırım Yapın Kazanın",...h})=>{const p={...I,...h},u=[...g(p.idTitle,p.nameTitle,p.startTitle,p.endTitle,p.statusTitle,p.ticketsTitle),{key:"actions",dataIndex:"key",title:"",maxWidth:220,render:(e,i)=>t("span",{className:"hub__pay-actions hub__pay-actions--full",children:i.tickets.length>0?t(s,{variant:"default",size:"medium",onClick:()=>l(i),children:c}):t(s,{variant:"default",size:"medium",onClick:r,children:m})})}];return e(i,{children:[t(_,{children:n}),t(o,{columns:u,data:a,cellHeight:"84px",marker:d})]})},S=({data:a,intro:n,onPrizes:l,onTickets:r,marker:d={desktop:"inn-joined-raffles-table",list:"inn-mobile-joined-raffles-list",methods:"inn-mobile-joined-raffles-list-items",item:"inn-mobile-joined-raffles-list-item"},prizesLabel:c="Ödüllerim",ticketsLabel:m="Biletlerim",...h})=>{const p={...I,...h},u=[...g(p.idTitle,p.nameTitle,p.startTitle,p.endTitle,p.statusTitle,p.ticketsTitle),{key:"actions",dataIndex:"key",title:"",maxWidth:320,render:(i,a)=>e("span",{className:"hub__pay-actions",children:[t(s,{variant:"default",size:"medium",disabled:!a.prizes||0===a.prizes.length,onClick:()=>l(a),children:c}),t(s,{variant:"default",size:"medium",disabled:0===a.tickets.length,onClick:()=>r(a),children:m})]})}];return e(i,{children:[t(_,{children:n}),t(o,{columns:u,data:a,cellHeight:"84px",marker:d})]})};export{T as HUB_PRIZE_TONE,y as HubFreespinActivation,z as HubPrizesModal,j as HubRaffleActive,S as HubRaffleJoined,N as HubTicketsModal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a,jsxs as e}from"react/jsx-runtime";import{useRef as i}from"react";import{Copy as l,User as r}from"lucide-react";import n from"../../button/index.js";import s from"../../badge/index.js";import d from"../../table/index.js";import t from"../../result/index.js";import{Tooltip as c}from"../../tooltip/Tooltip.js";import{TooltipTrigger as m}from"../../tooltip/TooltipTrigger.js";import{TooltipContent as o}from"../../tooltip/TooltipContent.js";import{useHubMobile as h}from"./platform.js";const u=["name","brand","provider","subject","game"],p=({columns:i,data:l,list:r,methods:n,item:s})=>{const d=i.find(a=>"id"===a.key||"token"===a.key),t=i.find(a=>u.includes(String(a.key)))||i.find(a=>a.maxWidth)||i[1],c=i.find(a=>"status"===a.key),m=i.find(a=>""===a.title),o=i.filter(a=>a!==d&&a!==t&&a!==c&&a!==m),h=(a,e,i)=>a.render?a.render(e[a.dataIndex],e,i):e[a.dataIndex];return a("div",{className:r?r+" hub__mlist":"hub__mlist",children:a("div",{className:n,style:{display:"contents"},children:l.map((i,l)=>e("div",{className:s?s+" hub__mcard":"hub__mcard",children:[e("div",{className:"hub__mcard-head",children:[e("span",{className:"hub__mcard-title",children:[d&&a("span",{className:"hub__mcard-id",children:h(d,i,l)}),t&&a("span",{className:"hub__mcard-name",children:h(t,i,l)})]}),c&&a("span",{className:"hub__mcard-status",children:h(c,i,l)})]}),o.length>0&&a("hr",{className:"hub__mcard-sep"}),o.length>0&&(()=>{const r=i.img,n=i.square,s=a("div",{className:"hub__mcard-body",children:o.map(r=>e("div",{className:"hub__mcard-row",children:[a("span",{className:"hub__mcard-label",children:"string"==typeof r.title?r.title:""}),a("span",{className:"hub__mcard-val",children:h(r,i,l)})]},String(r.key)))});return r?e("div",{className:"hub__mcard-media",children:[a("span",{className:"hub__mcard-img"+(n?" hub__mcard-img--square":""),style:{backgroundImage:r},"aria-hidden":!0}),s]}):s})(),m&&a("div",{className:"hub__mcard-foot",children:h(m,i,l)})]},l))})})},_=({columns:e,data:l,cellHeight:r,mobileColumns:n,marker:s})=>{const t=i(null);return h(t)?a(p,{columns:n??e,data:l,list:s?.list,methods:s?.methods,item:s?.item}):a("div",{ref:t,className:(s?.desktop?s.desktop+" ":"")+"hub__paybox hub__pay-table",children:a(d,{columns:e,data:l,cellHeight:r,headerBg:!1})})},b={"Açık":"purple",Beklemede:"warning","Onaylandı":"success",Reddedildi:"danger","İptal Edildi":"info","Zaman Aşımı":"warning","İşlemde":"orange","Tamamlandı":"success","Kullanıcı Vazgeçti":"danger","Başvuruldu":"purple","Kabul Edildi":"teal","Kazandı":"success",Kaybetti:"danger","Talep Edilebilir":"success","Tekrar Talep Edilebilir":"warning","Talep Edilemez":"default","Uygulandı":"purple",Aktif:"info","Kazananlar Bildirildi":"warning","Yanıtlandı":"info","Kapandı":"default"},f=({s:e,tone:i=b})=>a(s,{variant:"default",color:i[e]??"default",size:"medium",pill:!1,children:e}),g=({value:i,compact:r,label:s="Kopyala"})=>e(c,{children:[a(m,{asChild:!0,children:a(n,{variant:"custom",size:"icon-sm",className:"hub__copybtn rounded-full"+(r?" hub__copybtn--sm":""),"aria-label":s,onClick:()=>navigator.clipboard?.writeText(i),children:a(l,{size:r?10:12})})}),a(o,{placement:"top",children:s})]}),N=({name:i,desc:l,creator:n,creatorLabel:s="Oluşturan: "})=>e("span",{className:"hub__pay-name hub__hist-nm",children:[a("span",{className:"hub__hist-name",children:i}),l&&e("span",{className:"hub__pay-desc hub__hist-desc",children:[l,n&&e(c,{children:[a(m,{asChild:!0,children:a("i",{className:"hub__hist-creator","aria-label":s+n,children:a(r,{size:12})})}),a(o,{placement:"top",children:s+n})]})]})]}),y=({v:i})=>{const[l,r]=i.split(" ");return e("span",{className:"hub__hist-dt",children:[a("span",{children:l}),a("span",{children:r})]})},k=({title:e="ÇOK YAKINDA",description:i="Bu bölüm henüz yapım aşamasındadır ve çok yakında yayında olacaktır.",icon:l="🚧"})=>a(t,{className:"hub__soon",image:a("span",{className:"hub__soon-icon","aria-hidden":!0,children:l}),title:e,description:i});export{u as HUB_NAME_KEYS,b as HUB_STATUS_TONE,k as HubComingSoon,g as HubCopyBtn,y as HubDt,N as HubHistName,f as HubStatusBadge,_ as HubTable,
|
|
1
|
+
import{jsx as a,jsxs as e}from"react/jsx-runtime";import{useRef as i}from"react";import{Copy as l,User as r}from"lucide-react";import n from"../../button/index.js";import s from"../../badge/index.js";import d from"../../table/index.js";import t from"../../result/index.js";import{Tooltip as c}from"../../tooltip/Tooltip.js";import{TooltipTrigger as m}from"../../tooltip/TooltipTrigger.js";import{TooltipContent as o}from"../../tooltip/TooltipContent.js";import{useHubMobile as h}from"./platform.js";const u=["name","brand","provider","subject","game"],p=({columns:i,data:l,list:r,methods:n,item:s})=>{const d=i.find(a=>"id"===a.key||"token"===a.key),t=i.find(a=>u.includes(String(a.key)))||i.find(a=>a.maxWidth)||i[1],c=i.find(a=>"status"===a.key),m=i.find(a=>""===a.title),o=i.filter(a=>a!==d&&a!==t&&a!==c&&a!==m),h=(a,e,i)=>a.render?a.render(e[a.dataIndex],e,i):e[a.dataIndex];return a("div",{className:r?r+" hub__mlist":"hub__mlist",children:a("div",{className:n,style:{display:"contents"},children:l.map((i,l)=>e("div",{className:s?s+" hub__mcard":"hub__mcard",children:[e("div",{className:"hub__mcard-head",children:[e("span",{className:"hub__mcard-title",children:[d&&a("span",{className:"hub__mcard-id",children:h(d,i,l)}),t&&a("span",{className:"hub__mcard-name",children:h(t,i,l)})]}),c&&a("span",{className:"hub__mcard-status",children:h(c,i,l)})]}),o.length>0&&a("hr",{className:"hub__mcard-sep"}),o.length>0&&(()=>{const r=i.img,n=i.square,s=a("div",{className:"hub__mcard-body",children:o.map(r=>e("div",{className:"hub__mcard-row",children:[a("span",{className:"hub__mcard-label",children:"string"==typeof r.title?r.title:""}),a("span",{className:"hub__mcard-val",children:h(r,i,l)})]},String(r.key)))});return r?e("div",{className:"hub__mcard-media",children:[a("span",{className:"hub__mcard-img"+(n?" hub__mcard-img--square":""),style:{backgroundImage:r},"aria-hidden":!0}),s]}):s})(),m&&a("div",{className:"hub__mcard-foot",children:h(m,i,l)})]},l))})})},_=({columns:e,data:l,cellHeight:r,mobileColumns:n,marker:s})=>{const t=i(null);return h(t)?a(p,{columns:n??e,data:l,list:s?.list,methods:s?.methods,item:s?.item}):a("div",{ref:t,className:(s?.desktop?s.desktop+" ":"")+"hub__paybox hub__pay-table",children:a(d,{columns:e,data:l,cellHeight:r,headerBg:!1})})},b={"Açık":"purple",Beklemede:"warning","Onaylandı":"success",Reddedildi:"danger","İptal Edildi":"info","Zaman Aşımı":"warning","İşlemde":"orange","Tamamlandı":"success","Kullanıcı Vazgeçti":"danger","Başvuruldu":"purple","Kabul Edildi":"teal","Kazandı":"success",Kaybetti:"danger","Talep Edilebilir":"success","Tekrar Talep Edilebilir":"warning","Talep Edilemez":"default","Uygulandı":"purple",Aktif:"info","Kazananlar Bildirildi":"warning","Yanıtlandı":"info","Kapandı":"default"},f=({s:e,tone:i=b})=>a(s,{variant:"default",color:i[e]??"default",size:"medium",pill:!1,children:e}),g=({value:i,compact:r,label:s="Kopyala"})=>e(c,{children:[a(m,{asChild:!0,children:a(n,{variant:"custom",size:"icon-sm",className:"hub__copybtn rounded-full"+(r?" hub__copybtn--sm":""),"aria-label":s,onClick:()=>navigator.clipboard?.writeText(i),children:a(l,{size:r?10:12})})}),a(o,{placement:"top",children:s})]}),N=({name:i,desc:l,creator:n,creatorLabel:s="Oluşturan: "})=>e("span",{className:"hub__pay-name hub__hist-nm",children:[a("span",{className:"hub__hist-name",children:i}),l&&e("span",{className:"hub__pay-desc hub__hist-desc",children:[l,n&&e(c,{children:[a(m,{asChild:!0,children:a("i",{className:"hub__hist-creator","aria-label":s+n,children:a(r,{size:12})})}),a(o,{placement:"top",children:s+n})]})]})]}),y=({v:i})=>{const[l,r]=i.split(" ");return e("span",{className:"hub__hist-dt",children:[a("span",{children:l}),a("span",{children:r})]})},k=({title:e="ÇOK YAKINDA",description:i="Bu bölüm henüz yapım aşamasındadır ve çok yakında yayında olacaktır.",icon:l="🚧"})=>a(t,{className:"hub__soon",image:a("span",{className:"hub__soon-icon","aria-hidden":!0,children:l}),title:e,description:i});export{u as HUB_NAME_KEYS,b as HUB_STATUS_TONE,k as HubComingSoon,g as HubCopyBtn,y as HubDt,N as HubHistName,f as HubStatusBadge,_ as HubTable,h as useHubMobile};
|