(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[456],{555:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/simulateur-frais-resiliation",function(){return i(2007)}])},6388:function(e,t,i){"use strict";i.r(t);var s=i(5893),r=i(2135),n=i(7294);t.default=e=>{let{imageSrc:t,title:i,text:a}=e,[l,o]=(0,n.useState)({name:"mon-offre-bbox",urlRedirect:"https://www.bouyguestelecom.fr/mon-compte/rappel-client?serviceID=wcb_Intention_Resiliation_Bbox"});return(0,s.jsxs)(r.Zbd,{children:[(0,s.jsx)(r.xuS,{src:t}),(0,s.jsxs)(r.aYP,{className:"has-background-white",children:[(0,s.jsx)(r.Dxz,{children:i}),(0,s.jsx)(r.xvT,{level:"TWO",children:a}),(0,s.jsx)(r.u_l,{className:"custo-modal-rappelez-moi-offre",closeIcon:!0,triggerClassNames:"button is-secondary",triggerContent:"Me faire rappeler",triggerMarkup:"a",title:"Discutons de votre offre",children:(0,s.jsxs)(r.QZq,{children:[(0,s.jsxs)(r.aD4,{children:[(0,s.jsx)(r.LZC,{size:r._Vm.LARGE}),(0,s.jsx)(r.xvT,{level:r.MFh.ONE,children:"Pour quelle offre voulez-vous qu’on vous rappelle ?"}),(0,s.jsxs)(r.PhF,{label:"Votre offre",name:"rappelez-moi-offre",onChange:e=>{if(e.selectName&&e.selectValue)switch(e.selectValue){case"mon-offre-bbox":o({name:"mon-offre-bbox",urlRedirect:"https://www.bouyguestelecom.fr/mon-compte/rappel-client?serviceID=wcb_Intention_Resiliation_Bbox"});break;case"mon-forfait-mobile":o({name:"mon-forfait-mobile",urlRedirect:"https://www.bouyguestelecom.fr/mon-compte/rappel-client?serviceID=wcb_formulaire_ir_sensation"})}},selected:l.name,children:[(0,s.jsx)(r.$mR,{value:"mon-offre-bbox",label:"Mon offre Bbox"}),(0,s.jsx)(r.$mR,{value:"mon-forfait-mobile",label:"Mon forfait mobile"})]})]}),(0,s.jsx)(r.aD4,{narrow:!0,className:"is-paddingless",children:(0,s.jsx)(r.zxk,{markup:"a",href:l.urlRedirect,variant:r.rp$.PRIMARY,children:"Me faire rappeler"})})]})})]})]})}},9660:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return c}});var s=i(5893),r=i(2135);i(7294);var n=i(381),a=i.n(n);let l=(e,t,i,s)=>e>12?(e-12)*t+12*t/s:i?e*t:e*t/s,o=(e,t)=>{let i=parseFloat(e.offerPrice),s=0!=e.commitmentDuration?parseInt(e.commitmentDuration.substring(0,2)):0,r=a()(e.offerSubscriptionDate).add(s,"M").toString(),n=a()(r,"ddd MMM DD YYYY HH:mm:ss [GMT]ZZ"),o=n.format("YYYY-MM-DD"),c=a()(e.offerSubscriptionDate).toDate(),u=a()(e.offerTerminationDate),m=a()(o),d=Math.max(0,m.diff(u,"months")),f=0;if(isNaN(e.offerPrice)||!a()(e.offerSubscriptionDate,"YYYY-MM-DD",!0).isValid()||!a()(e.offerTerminationDate,"YYYY-MM-DD",!0).isValid())return t({...e,errMsg:"Veuillez entrer des valeurs valides"});let x=a()(c).isAfter("2022-12-31"),h=a()(c).isBefore("2023-01-01"),p="forfait-avec-mobile"===e.contractType||"bbox-avec-tv"===e.contractType,v="12-months"===e.commitmentDuration;return x&&p?f=l(d,i,v,5):x?f=d>12?(d-12)*i:v?d*i:0:h&&(f=l(d,i,v,4)),t({...e,fee:f})};var c=e=>{let{formData:t,setFormData:i}=e,n=e=>{if(e.inputName&&e.inputValue){i({...t,[e.inputName]:e.inputValue});return}if(e.target.name&&e.target.value){i({...t,[e.target.name]:e.target.value});return}},a=e=>{e.selectName&&e.selectValue&&i({...t,[e.selectName]:e.selectValue})},l=new Date(Date.now()),c=new Date(l.setDate(l.getDate()+10)),u=c.getFullYear()+"-"+("0"+(c.getMonth()+1)).slice(-2)+"-"+("0"+c.getDate()).slice(-2);return(0,s.jsx)("form",{className:"custom-form-resiliation",children:(0,s.jsxs)(r.QZq,{children:[(0,s.jsxs)(r.aD4,{children:[(0,s.jsx)(r.xvT,{level:"ONE",children:"Type de Contrat"}),(0,s.jsxs)(r.PhF,{label:"Contrat",name:"contractType",onChange:a,selected:null==t?void 0:t.contractType,children:[(0,s.jsx)(r.$mR,{id:"contract-type-0",label:"Forfait AVEC Mobile",value:"forfait-avec-mobile"}),(0,s.jsx)(r.$mR,{id:"contract-type-1",label:"Forfait SANS Mobile (byou & simo)",value:"forfait-sans-mobile"}),(0,s.jsx)(r.$mR,{id:"contract-type-2",label:"Bbox avec TV (Smart TV/Ultym/Indiana)",value:"bbox-avec-tv"}),(0,s.jsx)(r.$mR,{id:"contract-type-3",label:"Bbox sans TV /xGbox",value:"bbox-sans-tv"})]})]}),(0,s.jsxs)(r.aD4,{children:[(0,s.jsx)(r.xvT,{level:"ONE",children:"Prix de votre offre (hors options et services)"}),(0,s.jsxs)("div",{className:"custom_price",children:[(0,s.jsx)("input",{className:"input",name:"offerPrice",placeholder:"",onChange:n,style:{paddingRight:"15px"},type:"number",min:0}),(0,s.jsx)("p",{children:"€ / mois"})]})]}),(0,s.jsxs)(r.aD4,{children:[(0,s.jsx)(r.xvT,{level:"ONE",children:"La date de souscription"}),(0,s.jsx)(r.IIB,{type:r.n$I.DATE,name:"offerSubscriptionDate",onChange:n})]}),(0,s.jsxs)(r.aD4,{children:[(0,s.jsx)(r.xvT,{level:"ONE",children:"La dur\xe9e d'engagement"}),(0,s.jsxs)(r.PhF,{label:"Dur\xe9e",name:"commitmentDuration",onChange:a,selected:null==t?void 0:t.commitmentDuration,children:[(0,s.jsx)(r.$mR,{id:"commitment-duration-0",label:"12 mois",value:"12-months"}),(0,s.jsx)(r.$mR,{id:"commitment-duration-1",label:"24 mois",value:"24-months"}),(0,s.jsx)(r.$mR,{id:"commitment-duration-2",label:"Sans engagement",value:"no-commitment"})]})]}),(0,s.jsxs)(r.aD4,{children:[(0,s.jsx)(r.xvT,{level:"ONE",children:"A quelle date souhaitez-vous r\xe9silier ?"}),(0,s.jsx)("div",{className:"field",children:(0,s.jsx)("div",{className:"control",children:(0,s.jsx)("input",{role:"textbox",type:"date",min:u,name:"offerTerminationDate",className:"input is-default",onChange:n})})})]}),(0,s.jsx)(r.aD4,{children:(0,s.jsx)(r.zxk,{variant:r.rp$.PRIMARY,"data-tc-clic":"Calculer_mes_frais","data-tc-action":"Clic_affichage","data-tc-categorie":"Estimation_frais_resiliation",onClick:()=>o(t,i),children:"Calculer mes frais"})})]})})}},2007:function(e,t,i){"use strict";i.r(t);var s=i(5893),r=i(7294),n=i(9660),a=i(6388),l=i(2135),o=i(9008),c=i.n(o);let u={fee:0,offerPrice:0,offerSubscriptionDate:"",offerTerminationDate:"",commitmentDuration:0,errMsg:null,urlModal:"https://www.bouyguestelecom.fr/mon-compte/rappel-client?serviceID=wcb_formulaire_ir_sensations"};t.default=()=>{let[e,t]=(0,r.useState)(u);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(c(),{children:[(0,s.jsx)("title",{children:"Simulateur de frais de r\xe9siliation | Bouygues Telecom"}),(0,s.jsx)("link",{rel:"stylesheet",type:"text/css",href:"/statics/landing-pages/styles/simulateur-frais-resiliation/style.css"})]}),(0,s.jsxs)("main",{className:"custom-resiliation-main-content",children:[(0,s.jsx)(l.$0h,{className:"custom-section-resiliation",children:(0,s.jsx)(l.W20,{medium:!0,children:(0,s.jsx)(l.oeA,{children:(0,s.jsxs)(l.nld,{children:[(0,s.jsx)(l.s01,{level:l.Cqk.LEVEL3,markup:"h1",children:"Estimez vos frais de r\xe9siliation"}),(0,s.jsx)(l.xvT,{markup:"p",marginless:!0,children:"Nous serions tr\xe8s tristes de vous voir partir... Mais si vous avez besoin d’y voir plus clair, prenez 2 minutes pour renseigner ces quelques informations."}),(0,s.jsx)(l.LZC,{size:l._Vm.SMALL}),(0,s.jsxs)(l.xvT,{markup:"p",children:["Vous n’avez pas toutes ces informations en t\xeate ? Retrouvez-les directement dans votre ",(0,s.jsx)("a",{href:"https://www.bouyguestelecom.fr/mon-compte/",className:"link",children:"espace client"}),"."]})]})})})}),(0,s.jsx)(l.$0h,{className:"custom-section-resiliation",children:(0,s.jsxs)(l.W20,{medium:!0,children:[(0,s.jsx)(l.Dxz,{level:l.ji.THREE,markup:"h1",children:"Nous avons besoin de quelques informations"}),(0,s.jsx)(l.xuv,{shadowless:!0,children:(0,s.jsx)(l.eSg,{children:(0,s.jsx)(n.default,{formData:e,setFormData:t})})}),e.fee>=0?(0,s.jsx)(l.xuv,{children:(0,s.jsx)(l.eSg,{background:l.NkQ.TERTIARY,children:(0,s.jsxs)(l.oeA,{children:[(0,s.jsx)(l.nld,{verticalCenter:!0,narrow:!0,children:(0,s.jsx)(l.xvT,{level:"ONE",marginless:!0,inverted:!0,children:"Vos frais de r\xe9siliation estim\xe9s :"})}),(0,s.jsx)(l.nld,{verticalCenter:!0,narrow:!0,children:(0,s.jsx)(l.tAG,{amount:e.fee,inverted:!0})})]})})}):null,(0,s.jsx)(l.P_k,{iconName:l.uHH.INFOS_CIRCLE,hasIcon:!0,info:!0,title:"Ceci est une estimation",description:"Le montant estim\xe9 d\xe9pend des informations que vous renseignez. On vous le fournit \xe0 titre indicatif."}),(0,s.jsx)(l.oeA,{children:(0,s.jsx)(l.nld,{children:(0,s.jsx)(a.default,{imageSrc:"https://www.bouyguestelecom.fr/static/wbm/media/simulateur-frais-resiliation/service-client@2x.webp",title:"On discute une derni\xe8re fois de votre offre ?",text:"Connaissez-vous toutes les alternatives sur votre offre ? Un conseiller vous rappelle pour faire le point avec vous. Alors, on discute ?"})})})]})})]})]})}},9008:function(e,t,i){e.exports=i(9201)}},function(e){e.O(0,[28,885,135,774,888,179],function(){return e(e.s=555)}),_N_E=e.O()}]);