"use strict";(globalThis.webpackChunknotion_next=globalThis.webpackChunknotion_next||[]).push([[85978],{608719:(e,t,s)=>{s.d(t,{g:()=>m});s(667294);var a=s(800480),n=s(184747),o=s(886628),r=s(709291),i=s(653965),l=s(286572),u=s(80444),d=s(400505),c=s(785893);function m(e){var t;const{title:s,name:i,onChangeName:l,businessName:m,onChangeBusinessName:g,validationErrors:h,modalId:x}=e,y=(0,r.useIntl)(),M=(0,a.O7)(),f=(0,o.VK)((()=>{const{currentUserStore:e}=u.default.state,t=null!=e&&e.isDefined()?e.getModel():void 0;return(null==t?void 0:t.getFullName(y))??""}),[y]);return(0,n.Z)((()=>{f&&l(f)})),(0,c.jsxs)(d.FC,{title:s,children:[(0,c.jsx)(d.yQ,{value:i,errorMessage:null==h||null===(t=h.name)||void 0===t?void 0:t.message,onChange:e=>{x&&p({environment:M,addressType:"name",addressUpdate:e.target.value,modal_id:x}),l(e.target.value)},placeholder:y.formatMessage({defaultMessage:"Name",id:"billingDetails.name"}),customHeight:42}),(0,c.jsx)(d.yQ,{value:m,onChange:e=>{x&&p({environment:M,addressType:"businessName",addressUpdate:e.target.value,modal_id:x}),g(e.target.value)},placeholder:y.formatMessage({defaultMessage:"Business name (optional)",id:"billingDetails.businessName"}),customHeight:42})]})}const p=(0,i.Ds)((e=>{let{environment:t,addressType:s,addressUpdate:a,modal_id:n}=e;l.rY(t,{addressType:s,addressUpdate:a,modal_id:n})}),1e3)},423412:(e,t,s)=>{s.d(t,{n:()=>h});var a=s(629756),n=(s(667294),s(800480)),o=s(886628),r=s(724405),i=s(709291),l=s(286572),u=s(998501),d=s(471859),c=s(80444),m=s(327242),p=s(400505),g=s(785893);function h(e){const{hideTitle:t,modalId:s}=e,h=(0,n.O7)(),x=(0,r.yK)((e=>({lockIcon:{width:12,color:e.icon.tertiary}})),[]),y={defaultValues:{billingDetails:(0,o.VK)((()=>{const e=c.default.state.currentUserStore;return{email:null==e?void 0:e.getEmail(),name:null==e?void 0:e.getName()}}),[])}};return(0,g.jsx)(p.FC,{title:t?null:(0,g.jsxs)(u.jX,{direction:"row",gap:"auto",align:"center",children:[(0,g.jsx)(i.FormattedMessage,{id:"checkoutPaymentField.paymentDetails.title",defaultMessage:"Payment details"}),(0,d.Q)(x.lockIcon)]}),children:(0,g.jsx)(a.PaymentElement,{options:y,onChange:e=>{l.Dc(h,{event:e,modal_id:s}),m.Z.update((e=>{if(!e.open)return e;const{paymentData:t,...s}=e;return s}))}})})}},292111:(e,t,s)=>{s.d(t,{Ce:()=>m,We:()=>p,c:()=>x,j4:()=>M,nO:()=>y,u8:()=>g,zX:()=>h});s(21703),s(667294);var a=s(909182),n=s(398724),o=s(181886),r=s(709291),i=s(653965),l=s(401898),u=s(151133),d=s(785893);const c={free:0,personal:1,student:1,ai:2,sites_custom_hostnames:2,plus:3,business:4,enterprise:5};function m(e){switch(e){case"ai":return(0,d.jsx)(r.FormattedMessage,{id:"subscriptionUpgradeModal.upgradeButton.upgradeAi",defaultMessage:"Upgrade now"});case"plus":return(0,d.jsx)(r.FormattedMessage,{id:"subscriptionUpgradeModal.upgradeButton.upgradeToPlus",defaultMessage:"Upgrade to Plus"});case"business":return(0,d.jsx)(r.FormattedMessage,{id:"subscriptionUpgradeModal.upgradeButton.upgradeToBusiness",defaultMessage:"Upgrade to Business"});case"enterprise":return(0,d.jsx)(r.FormattedMessage,{id:"subscriptionUpgradeModal.upgradeButton.upgradeToEnterprise",defaultMessage:"Upgrade to Enterprise"});default:return(0,d.jsx)(r.FormattedMessage,{id:"subscriptionUpgradeModal.upgradeButton.upgradeNow",defaultMessage:"Upgrade now"})}}function p(e){const{product:t,isMmOrEnt:s,isTrial:a,coupon:n}=e;switch(t){case"ai":return"ai_fifty_percent"===n?{subtitle:(0,d.jsx)(r.FormattedMessage,{id:"addOnUpgrade.studentAiOffer.confirmation.description",defaultMessage:"Your personal teaching assistant, code reviewer, brainstorming partner, and more — right in your workspace"})}:{subtitle:(0,d.jsx)(r.FormattedMessage,{id:"addOnUpgrade.confirmation.description",defaultMessage:"Generate content, summarize key points, and find info across Notion and your connected apps"})};case"sites_custom_hostnames":return{};case"plus":return{title:a?(0,d.jsx)(r.FormattedMessage,{id:"subscriptionUpgradeModal.title.plusTrial.checkout",defaultMessage:"Try the Plus plan free for {isMmOrEnt, select, true {30} other {14}} days",values:{isMmOrEnt:s}}):(0,d.jsx)(r.FormattedMessage,{id:"subscriptionUpgradeModal.title.plus",defaultMessage:"Upgrade to Plus"}),subtitle:a?(0,d.jsx)(r.FormattedMessage,{id:"subscriptionUpgradeModal.oneLiner.trial.checkout",defaultMessage:"Unlock Notion’s premium features for {isMmOrEnt, select, true {four} other {two}} weeks. Cancel anytime.",values:{isMmOrEnt:s}}):(0,d.jsx)(r.FormattedMessage,{id:"subscriptionUpgradeModal.oneLiner.v2.plus",defaultMessage:"Do more with unlimited blocks, files, automations & integrations"})};case"business":return{title:a?(0,d.jsx)(r.FormattedMessage,{id:"subscriptionUpgradeModal.title.businessTrial",defaultMessage:"Try the Business plan for free"}):(0,d.jsx)(r.FormattedMessage,{id:"subscriptionUpgradeModal.upgradeToBusinessDialog.businessPlan",defaultMessage:"Upgrade to Business"}),subtitle:a?(0,d.jsx)(r.FormattedMessage,{id:"subscriptionUpgradeModal.oneLiner.trial",defaultMessage:"Collaborate with unlimited people with full access to features such as file uploads and automations. {isMmOrEnt, select, true {30} other {14}} days for free. Cancel the trial stress-free at any time.",values:{isMmOrEnt:s}}):(0,d.jsx)(r.FormattedMessage,{id:"subscriptionUpgradeModal.oneLiner.v2.business",defaultMessage:"For companies using Notion to connect several teams & tools"})};case"enterprise":return{title:(0,d.jsx)(r.FormattedMessage,{id:"subscriptionUpgradeModal.title.enterprise",defaultMessage:"Upgrade to Enterprise"}),subtitle:(0,d.jsx)(r.FormattedMessage,{id:"subscriptionUpgradeModal.oneLiner.v2.enterprise",defaultMessage:"Advanced controls & support to run your entire organization"})}}}function g(e){if(0===e.length)return;const t=(0,i.UT)((0,i.oA)(e),(e=>c[e]));if(t)switch(t){case"ai":case"sites_custom_hostnames":case"plus":case"business":case"enterprise":return t;case"free":case"personal":case"student":throw new Error("Invalid product passed into checkout.");default:(0,l.t1)(t)}}function h(e){var t;const{pricesByInterval:s,billingData:r,billingInterval:i,memberCount:l,promo:d,coupon:c,accountBalance:m=0}=e,p=s[i],g=(null===(t=(0,a.a7)(null==r?void 0:r.subscription,"sites_custom_hostnames"))||void 0===t?void 0:t.quantity)??0,h=(0,o.Vj)({prices:p,quantity:l,domainsQuantity:g}),x=(0,u.cv)({items:h,coupon:c}),y=(0,u.rF)({items:h,promo:d});let M;"year"===i&&(M=(0,u.cv)({items:(0,o.Vj)({prices:s.month,quantity:l,domainsQuantity:g}),coupon:c}).withMultipliedAmount(12));const f=p[0].unitAmount.currencyValue;return{subtotal:x,discount:y,balance:new n.n(f,-m),monthlyPriceBilledAnnually:M}}function x(e,t){const{subtotal:s,discount:a,balance:n}=e;return s.minus(a).minus(n).plus(t).zeroIfNegative()}function y(e,t){var s;return null===(s=e.find((e=>e.product===t)))||void 0===s?void 0:s.getMonthlyUnitCost().toMoneyValue()}function M(e,t){if(!e)return!1;const s=(0,a.Hw)(e.subscription);return t&&"year"===s}},725846:(e,t,s)=>{s.d(t,{M:()=>r});s(667294);var a=s(985050),n=s(277907),o=s(785893);function r(e){let{isExpanded:t,children:s}=e;const{value:r}=(0,n.XJ)(a.io);if(!r)return null;const{AnimatePresence:i,motion:l}=r;return(0,o.jsx)(i,{initial:!1,children:t&&(0,o.jsx)(l.div,{style:{overflow:"hidden"},initial:"collapsed",animate:"open",exit:"collapsed",variants:{open:{height:"auto"},collapsed:{height:0}},transition:{duration:.2},children:s},"details")})}},529603:(e,t,s)=>{s.d(t,{n:()=>r});s(667294);var a=s(998501),n=s(707124),o=s(785893);function r(e){const{itemName:t,value:s}=e;return(0,o.jsxs)(a.jX,{direction:"row",gap:"auto",align:"center",children:[(0,o.jsx)(n.q,{styleName:"Body-14px/Regular",colorName:"secondary",children:t}),(0,o.jsx)(n.q,{styleName:"Body-14px/Regular",colorName:"secondary",children:s})]})}},437698:(e,t,s)=>{s.d(t,{J:()=>d});s(667294);var a=s(724405),n=s(709291),o=s(998501),r=s(568785),i=s(727533),l=s(529603),u=s(785893);function d(e){const{subtotal:t,tax:s,isCalculatingTax:d,accountBalance:c,discount:m,showDiscountLine:p,subtotalMonthly:g}=e,h=(0,a.yK)((e=>({discountText:{color:e.accentColors.green[500]},strikethrough:{textDecorationLine:"line-through",marginRight:4}})),[]),x=0===s.amount?"—":(0,u.jsx)(i.W,{cost:s.toMoneyValue(),trailingZeroDisplay:"stripIfInteger"});return(0,u.jsxs)(o.jX,{gap:4,children:[(0,u.jsx)(l.n,{itemName:(0,u.jsx)(n.FormattedMessage,{id:"checkout.orderSummary.subtotal",defaultMessage:"Subtotal"}),value:(0,u.jsxs)(u.Fragment,{children:[g&&(0,u.jsx)("span",{style:h.strikethrough,children:(0,u.jsx)(i.W,{cost:g.toMoneyValue(),trailingZeroDisplay:"auto"})}),(0,u.jsx)(i.W,{cost:t.toMoneyValue(),trailingZeroDisplay:"auto"})]})}),(0,u.jsx)(l.n,{itemName:(0,u.jsx)(n.FormattedMessage,{id:"checkout.orderSummary.taxIfApplicable",defaultMessage:"Tax if applicable"}),value:d?(0,u.jsx)(r.Z,{}):x}),p&&(0,u.jsx)(l.n,{itemName:(0,u.jsx)(n.FormattedMessage,{id:"checkout.orderSummary.coupon",defaultMessage:"Coupon"}),value:(0,u.jsxs)("span",{style:h.discountText,children:["-",(0,u.jsx)(i.W,{cost:m.toMoneyValue(),trailingZeroDisplay:"auto"})]})}),0!==c.amount&&(0,u.jsx)(l.n,{itemName:(0,u.jsx)(n.FormattedMessage,{id:"checkout.orderSummary.balance",defaultMessage:"Balance"}),value:(0,u.jsxs)("span",{style:h.discountText,children:["-",(0,u.jsx)(i.W,{cost:c.toMoneyValue(),trailingZeroDisplay:"auto"})]})})]})}},737446:(e,t,s)=>{s.d(t,{t:()=>p});s(667294);var a=s(909182),n=s(181886),o=s(709291),r=s(401898),i=s(998501),l=s(707124),u=s(727533),d=s(733941),c=s(529603),m=s(785893);function p(e){const{items:t,showMonthlyPricing:s=!0}=e,a=t.length>1;return(0,m.jsx)(i.jX,{gap:16,children:t.map((e=>(0,m.jsx)(g,{quantity:e.quantity,price:e.price,showMonthlyPricing:s,hasMultipleProducts:a},e.price.externalId)))})}function g(e){const{quantity:t,price:s,hasMultipleProducts:i,showMonthlyPricing:l}=e,u=function(e,t){switch(e.product){case"ai":return t.formatMessage(d.D.ai);case"sites_custom_hostnames":return t.formatMessage(d.D.sites_custom_hostnames);case"personal":return t.formatMessage(d.D.personal);case"plus":return t.formatMessage(d.D.plus);case"business":return t.formatMessage(d.D.business);case"enterprise":return t.formatMessage(d.D.enterprise);case"free":case"student":return null;default:(0,r.t1)(e.product)}}(s,(0,o.useIntl)());return u?(0,m.jsxs)(y,{title:i?u:void 0,children:[(0,m.jsx)(h,{unit:(0,n.Lj)(s.product),quantity:t}),(0,m.jsx)(x,{price:(0,a.uD)(s),showMonthlyPricing:l,quantity:t})]},s.product):null}function h(e){const{unit:t,quantity:s}=e;switch(t){case"public_domain_custom_hostnames":return(0,m.jsx)(c.n,{itemName:(0,m.jsx)(o.FormattedMessage,{id:"checkout.orderSummary.domains",defaultMessage:"Domains"}),value:s});case"seats":return(0,m.jsx)(c.n,{itemName:(0,m.jsx)(o.FormattedMessage,{id:"checkout.orderSummary.membersInWorkspace",defaultMessage:"Members in your workspace"}),value:s});default:(0,r.t1)(t)}}function x(e){const{price:t,quantity:s,showMonthlyPricing:a}=e,i=(0,n.Lj)(t.product),l=(0,m.jsx)(u.W,{cost:a?t.getMonthlyUnitCost().toMoneyValue():t.unitAmount.toMoneyValue(),trailingZeroDisplay:"stripIfInteger"}),d=(0,m.jsx)(u.W,{cost:a?t.getMonthlyCost({quantity:s}).toMoneyValue():t.getCostPerBillingInterval({quantity:s}).toMoneyValue(),trailingZeroDisplay:"auto"});switch(i){case"public_domain_custom_hostnames":return(0,m.jsx)(c.n,{itemName:(0,m.jsx)(o.FormattedMessage,{id:"checkout.orderSummary.perPricePerMonth.domains",defaultMessage:"x {price} / {interval, select, month {month} year {year} other {period}} / domain",values:{price:l,interval:a?"month":t.billingInterval}}),value:d});case"seats":return(0,m.jsx)(c.n,{itemName:(0,m.jsx)(o.FormattedMessage,{id:"checkout.orderSummary.perPricePerMonth.seats",defaultMessage:"x {price} / {interval, select, month {month} year {year} other {period}} / member",values:{price:l,interval:a?"month":t.billingInterval}}),value:d});default:(0,r.t1)(i)}}function y(e){const{title:t,children:s}=e;return(0,m.jsxs)(i.jX,{gap:4,children:[t?(0,m.jsx)(l.q,{styleName:"Caption-12px/Semibold",colorName:"secondary",children:t}):null,s]})}},420798:(e,t,s)=>{s.d(t,{H:()=>p});s(667294);var a=s(724405),n=s(998501),o=s(661519),r=s(636596),i=s(292111),l=s(725846),u=s(437698),d=s(737446),c=s(460269),m=s(785893);function p(e){let{billingInterval:t,quantity:s,promo:p,coupon:g,tax:h,isExpanded:x,onClickDetails:y,pricesByInterval:M,subtotal:f,discount:j,balance:b,monthlyPriceBilledAnnually:v,isTaxLoading:w}=e;const k=(0,a.yK)((()=>({loader:{width:"50%",height:22,borderRadius:12}})),[]),F=M[t];if(!F.length)return(0,m.jsx)(r.Z,{style:k.loader});const I=v?v.minus(f):void 0,C=(0,i.c)({subtotal:f,discount:j,balance:b},h),N=F.map((e=>({price:e,quantity:s})));return(0,m.jsxs)(n.jX,{gap:8,children:[(0,m.jsx)(c.M,{total:C,billingInterval:t,handleToggleExpanded:y,isExpanded:x,discount:j,accountBalance:b,annualPriceDifference:I,isTotalLoading:w}),(0,m.jsx)(l.M,{isExpanded:x,children:(0,m.jsxs)(n.jX,{gap:12,children:[(0,m.jsx)(d.t,{items:N}),(0,m.jsx)(o.Z,{size:1}),(0,m.jsx)(u.J,{subtotal:f,tax:h,discount:j,showDiscountLine:0!==j.amount&&p&&!g,accountBalance:b,isCalculatingTax:w,subtotalMonthly:v})]})})]})}},460269:(e,t,s)=>{s.d(t,{M:()=>g});s(667294);var a=s(724405),n=s(709291),o=s(998501),r=s(690403),i=s(636596),l=s(707124),u=s(685740),d=s(528515),c=s(727533),m=s(615860),p=s(785893);function g(e){const{total:t,billingInterval:s,handleToggleExpanded:a,isExpanded:r,discount:g,accountBalance:y,annualPriceDifference:M,showDueToday:f,showTaxLabel:j,coupon:b,isTotalLoading:v}=e,w=x(),k="ai_fifty_percent"===b,F=0!==g.amount,I=0!==y.amount,C=F||I||f?(0,p.jsx)(c.W,{cost:t.toMoneyValue(),trailingZeroDisplay:"stripIfInteger"}):(0,p.jsx)(n.FormattedMessage,{id:"checkout.orderSummary.pricePerInterval",defaultMessage:"{price} / {interval, select, month {month} year {year} other {period}}",values:{price:(0,p.jsx)(c.W,{cost:t.toMoneyValue(),trailingZeroDisplay:"stripIfInteger"}),interval:s}});return(0,p.jsxs)(p.Fragment,{children:[(F||I||f)&&(0,p.jsx)(l.q,{styleName:"Caption-12px/Semibold",colorName:"secondary",children:(0,p.jsx)(n.FormattedMessage,{id:"checkout.orderSummary.totalForToday",defaultMessage:"Total for today"})}),(0,p.jsxs)(o.jX,{direction:"row",gap:"auto",align:"center",children:[(0,p.jsxs)(o.jX,{direction:"row",align:"center-left",children:[(0,p.jsxs)(o.jX,{direction:"column",children:[v?(0,p.jsx)(i.Z,{style:w.loader}):(0,p.jsx)(l.q,{styleName:"Heading-17px/Semibold",customStyles:{display:"flex",alignItems:"center"},children:C}),j&&(0,p.jsx)(l.q,{styleName:"UISmall-12px/Regular",colorName:"secondary",children:(0,p.jsx)(n.FormattedMessage,{id:"checkout.orderSummary.taxApplicable",defaultMessage:"+ tax if applicable"})})]}),k?(0,p.jsx)(m.s,{}):null,M&&!k?(0,p.jsx)(h,{message:{id:"checkout.orderSummary.amountOff",defaultMessage:"{money} off"},money:M}):null,I&&(0,p.jsx)(h,{message:{id:"checkout.orderSummary.balanceAmount",defaultMessage:"{money} balance"},money:y}),F&&(0,p.jsx)(h,{message:{id:"checkout.orderSummary.couponAmount",defaultMessage:"{money} coupon"},money:g})]}),(0,p.jsx)(u.Z,{onClick:a,children:(0,p.jsxs)(o.jX,{direction:"row",gap:4,align:"center",children:[(0,p.jsx)(l.q,{styleName:"Body-14px/Regular",colorName:"secondary",children:(0,p.jsx)(n.FormattedMessage,{id:"checkout.orderSummary.details",defaultMessage:"Details"})}),(0,d.A)({...w.detailsIcon,transform:r?"rotateZ(180deg)":void 0})]})})]})]})}function h(e){const{message:t,money:s}=e,a=x();return(0,p.jsx)(r.Z,{content:(0,p.jsx)(n.FormattedMessage,{...t,values:{money:(0,p.jsx)(c.W,{cost:s.toMoneyValue(),trailingZeroDisplay:"stripIfInteger"})}}),style:a.discountBadge})}function x(){return(0,a.yK)((e=>({detailsIcon:{width:12,height:12,display:"block",color:e.icon.secondary},discountText:{color:e.accentColors.green[500]},discountBadge:{background:"light"===e.mode?e.accentColors.green[50]:e.accentColors.green[200],color:"light"===e.mode?e.accentColors.green[500]:e.accentColors.green[600]},loader:{width:90,height:18,borderRadius:12}})),[])}},400505:(e,t,s)=>{s.d(t,{hj:()=>g,MA:()=>M.M,wJ:()=>h,FC:()=>c,yQ:()=>y,J0:()=>f.J,tQ:()=>j.t,Mq:()=>b.M});var a=s(667294),n=s(724405),o=s(709291),r=s(998501),i=s(449806),l=s(818441),u=s(707124),d=s(785893);function c(e){let{title:t,children:s}=e;return(0,d.jsxs)(r.jX,{gap:8,children:[t?(0,d.jsx)(u.q,{styleName:"Caption-12px/Semibold",colorName:"secondary",children:t}):null,s]})}var m=s(727533);function p(e){let{price:t}=e;return(0,d.jsx)(o.FormattedMessage,{id:"checkout.orderOptions.pricePerMonth",defaultMessage:"{price} / month / member",values:{price:t?(0,d.jsx)(m.W,{cost:t,trailingZeroDisplay:"stripIfInteger"}):"-"}})}function g(e){let{onChange:t,selectedAddOn:s,unitPrice:u}=e;const m=(0,n.yK)((e=>({container:{borderRadius:6},aiIcon:{width:13,height:12,color:e.icon.purple},supportText:{width:"90%"}})),[]),g=(0,a.useMemo)((()=>[{value:"ai",label:(0,d.jsxs)(r.jX,{direction:"row",align:"center-left",gap:2,children:[(0,d.jsx)(o.FormattedMessage,{id:"checkout.orderOptions.notionAI",defaultMessage:"Notion AI"}),(0,l.t)(m.aiIcon)]}),description:(0,d.jsx)(p,{price:u}),supportText:(0,d.jsx)("div",{style:m.supportText,children:(0,d.jsx)(o.FormattedMessage,{id:"checkout.orderOptions.notionAI.description",defaultMessage:"Unlimited use of Notion AI to chat, create, and search"})}),isSelected:"ai"===s}]),[s,u,m]);return(0,d.jsx)(c,{title:(0,d.jsx)(o.FormattedMessage,{id:"checkout.orderOptions.addOns",defaultMessage:"Add ons"}),children:g.map((e=>(0,d.jsx)(i.n,{style:m.container,name:"add-ons",selectType:"checkbox",onChange:e=>t(e.target.checked?e.target.value:void 0),...e},e.value)))})}function h(e){const{selectedBillingInterval:t,monthlyUnitPrice:s,yearlyUnitPrice:r,onChange:l,sectionTitle:m}=e,g=(0,n.yK)((e=>({discountText:{color:e.accentColors.green[500]}})),[]),h=(0,a.useMemo)((()=>[{value:"month",label:(0,d.jsx)(o.FormattedMessage,{id:"checkout.orderOptions.payMonthly",defaultMessage:"Pay monthly"}),description:(0,d.jsx)(p,{price:s}),isSelected:"month"===t},{value:"year",label:(0,d.jsx)(o.FormattedMessage,{id:"checkout.orderOptions.payAnnually",defaultMessage:"Pay annually"}),description:(0,d.jsx)(p,{price:r}),isSelected:"year"===t,additionalContent:(0,d.jsx)(u.q,{styleName:"Caption-12px/Medium",style:g.discountText,children:(0,d.jsx)(o.FormattedMessage,{id:"checkout.orderOptions.savePercent",defaultMessage:"Save {percent}%",values:{percent:20}})})}]),[t,s,r,g]);return(0,d.jsx)(c,{title:m||(0,d.jsx)(o.FormattedMessage,{id:"checkout.orderOptions.billingOptions",defaultMessage:"Billing options"}),children:h.map((e=>(0,d.jsx)(i.n,{style:{borderRadius:6},name:"billing-options",selectType:"radio",onChange:e=>l(e.target.value),...e},e.value)))})}var x=s(915316);function y(e){let{errorMessage:t,customHeight:s,...o}=e;const i=void 0!==t,l=(0,a.useRef)(null),[c,m]=a.useState(!1),p=function(e,t,s){return(0,n.yK)((a=>{const n={boxShadow:a.outlineRedInputBoxShadow,borderColor:a.stroke.uiRed},o={boxShadow:a.outlineBlueInputBoxShadow,borderColor:a.stroke.uiBlueDeemphasized};return{input:{padding:"10px, 8px",width:"100%",height:s??36,background:a.surface.wash,borderRadius:6,border:"1px solid",borderColor:a.stroke.regular,transition:"all 200ms ease-in-out",boxShadow:"none",...e?n:{},...t?o:{}}}}),[s,e,t])}(i,c,s);return(0,a.useEffect)((()=>{var e;i&&l.current&&(null===(e=l.current.textInput)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center"}))}),[l,i]),(0,d.jsxs)(r.jX,{gap:4,children:[(0,d.jsx)(x.Z,{ref:l,style:p.input,onFocus:()=>m(!0),onBlur:()=>m(!1),...o}),t?(0,d.jsx)(u.q,{styleName:"Caption-12px/Regular",colorName:"uiRedPrimary",children:t}):null]})}var M=s(725846),f=s(437698),j=s(737446),b=(s(420798),s(460269))}}]);