PageSourceSearch

https://partners.meridianbet.pe/build/assets/LinkForm-BZHG6HQ3.js

js meridianbet.pe collected 2026-10-02 06:58:58 UTC 3,067 bytes, 1 lines download raw bytes

1import{j as e,L as y,s as m}from"./main-CMViuH_f.js";import{e as G,d as R,a as p}from"./vendor-react-Bjxsyr_G.js";import{D as S}from"./vendor-redux-CkTbKByD.js";import{C as D}from"./ControlPanel-Dm3LeJij.js";import{T as K}from"./ToggleSwitch-yZc2BSIA.js";import{u as w,l as V,d as h,e as F,A as O}from"./labelKeys-C_E4TgEq.js";import{f as o}from"./formStyles-MU_CFwXq.js";import{e as P,h as U,i as H}from"./marketingApi-D2wmfmp7.js";import{u as Q}from"./vendor-i18n-CmmgQqfv.js";import"./vendor-forms-Chlqk9RW.js";import"./Input-BBroo5uU.js";import"./Checkbox-103DDomz.js";import"./affiliatesApi-DvcXrG9x.js";import"./TransformAffiliateResponse-Dl1Ei_ej.js";import"./marketing-CDM2BXlV.js";import"./validation-CmgQtWDq.js";function oe(){const{t}=Q(),{id:c}=G(),d=R(),l=S(),s=!!c,{values:i,errors:E,setValues:g,handleChange:u,validate:C}=w(F,h,{labelKeys:V}),{data:a,isLoading:v}=P(c,{skip:!s}),[A,{isLoading:I}]=U(),[b,{isLoading:j}]=H(),T=I||j;p.useEffect(()=>{a&&s&&g({...h,...a,active:a.active??0,exclusive:a.exclusive??0,exclusive_affiliates:a.exclusive_affiliates||[],product_type:String(a.product_type||"")})},[a,s]);const k=p.useMemo(()=>t(s?"MARKETING.EDIT_LINK_LANDING_PAGE":"MARKETING.ADD_LINK_LANDING_PAGE"),[s,t]),x=p.useCallback((r,f)=>{u(r,f)},[u]),M=async r=>{var N;if(r.preventDefault(),!!await C())try{const n={...i,product_type:parseInt(i.product_type,10)};s?(await b({id:c,...n}).unwrap(),l(m({notification:t("MESSAGE.UPDATED_MARKETING_ITEM"),notificationColor:"green"}))):(await A(n).unwrap(),l(m({notification:t("MESSAGE.CREATE_MARKETING_ITEM"),notificationColor:"green"}))),d("/marketing?tab=links")}catch(n){const L=((N=n==null?void 0:n.data)==null?void 0:N.message)||t("COMMON.ERROR");l(m({notification:L,notificationColor:"red"}))}},_=()=>{d("/marketing?tab=links")};return v?e.jsx(y,{}):e.jsxs("div",{className:"px-4 pb-4 pt-[6px] md:px-6 md:pb-6 md:pt-[14px]",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 mb-6",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("h1",{className:"font-medium text-[20px] text-[var(--mdn-text-87)] uppercase",children:k}),i.id&&e.jsxs("span",{className:"text-[14px] text-[var(--mdn-text-60)]",children:["ID: ",i.id]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[14px] text-[var(--mdn-text-87)] uppercase",children:t("MARKETING.ACTIVE")}),e.jsx(K,{checked:i.active===1,onChange:r=>x("active",r?1:0)})]})]}),e.jsxs("form",{onSubmit:M,children:[e.jsx(D,{title:t("MARKETING.ACCOUNT_INFO"),headerContainerClassName:o.panelHeader,titleClassName:o.panelTitle,collapsible:!0,defaultExpanded:!0,children:e.jsx("div",{className:"col-span-12",children:e.jsx(O,{marketing:i,errors:E,onChange:x})})}),e.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-3 mt-6",children:[e.jsx("button",{type:"button",onClick:_,className:o.btnCancel,children:t("MARKETING.CANCEL")}),e.jsx("button",{type:"submit",disabled:T,className:o.btnSave,children:t("MARKETING.SAVE")})]})]})]})}export{oe as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.