1import{r as e,u as s,j as o}from"./vendor.mIPXQGLM.js";import{F as t,c as r,b9 as n,ba as a,b4 as i,b6 as m}from"./index.bundle.js";import{L as c,az as d}from"./@constants.BRV_txzJ.js";import{G as u}from"./GreenArrowButton.BBPrNOIe.js";import{O as j,S as l}from"./Option.Db1kQC0f.js";import{S as p,O as g}from"./Commands.styles.MvSfBIY2.js";import{S as h}from"./QuestionButton.styles.YvRxqWN-.js";import{u as b,T as x}from"./@i18n.Cv0A4uHT.js";import"./@amplitude.yMGOHWCQ.js";import"./@xstate.CEsnlirg.js";import"./@firebase.Bkc6--w4.js";import"./@lottie.KPmlgv_O.js";import"./@react-router.hFdD-ZA2.js";import"./@lodash.D8yALn-Z.js";import"./@rudderstack.DVYreKjc.js";import"./right-white-arrow.jrmExGPe.js";import"./questions-check-off.BPJvZ_sw.js";import"./questions-check-on.B3DCfWRm.js";const f=[d.MARKER,d.LOOK,d.NAME,d.FIVE,d.SIT,d.NO,d.FOOD_LURING,d.TOUCH,d.NOSE],k=()=>{const{t:d,i18n:k}=b(),{onNextStep:O}=e.useContext(t),{currentPageId:y,currentPageNumber:C}=r(s(e=>({currentPageId:e.currentPageId,currentPageNumber:e.currentPageNumber}))),N=n(),[S,w]=e.useState([]),T=e.useMemo(()=>a(N,y),[N,y]),A=e.useMemo(()=>k.language===c.TR?"":d`onboarding.common.yourDog`,[k.language,d]),E=e.useCallback((e=!1)=>{y&&C&&(i({question:"Which commands has your dog already learned? (1)",answers:e?"none":S,pageName:y,pageNumber:C,answersToStore:e?[]:S}
1),O())},[S,y,C,O]),B=e.useMemo(()=>({...y&&{name:y},type:j.CHECKBOX,onChange:(e,s)=>{if(s)w([...S,e]);else{const s=S.filter(s=>s!==e);w(s)}}}),[S,y]);return e.useEffect(()=>{w(T)},[T]),m(),o.jsx(p.Wrapper2,{children:o.jsxs(p.Content3,{children:[o.jsx(p.Title2,{children:o.jsx(x,{values:{dogName:A},i18nKey:"onboarding.commands.question"})}),o.jsx(p.Subtitle,{children:o.jsx(x,{i18nKey:"onboarding.commands.subtitle",components:[o.jsx("br",{})]})}),o.jsx(l.OptionsContainer5,{"data-is-multiple":!0,"data-testid":"dog-known-commands",children:f.map(s=>e.createElement(g,{...B,value:s,"data-testid":`dog-known-commands-${s}`,key:s,checked:Array.isArray(S)&&S.includes(s)},o.jsx(h.Wrapper3,{"data-has-check-icon":!0,children:d(`onboarding.commands.${s}`)})))}),o.jsxs(p.StickyBlockWrapper,{children:[o.jsx(u,{isButtonDisabled:!S.length,onClick:()=>E()}),o.jsx(p.TextButton,{onClick:()=>E(!0),"data-testid":"quiz-option-none",children:d`onboarding.common.noneOfTheAbove`})]})]})})};export{k as CommandsVariant61};
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.