Deriving Snell's law from symmetries

In the book "Photonic Crystals, Molding the Flow of Light", the authors mention:

"Snell's laws are simply the combination of two conservation laws that follow from symmetry: conservation of frequency $$w$$ (from the linearity and time invariance of Maxwell's equations) and conservation of the component k$$_{||}$$ of k that is parallel to the interface.( from the continuous translational symmetry along the interface)"

I understand how the translational invariance leads to a conservation of k$$_{||}$$ in the medium on either side of the interface separately, but why should k$$_{||1}$$ be equal to k$$_{||2}$$ i.e k$$_{||}$$ remain conserved across the interface?

This thread provides answers with a classical intuition of billiard ball reflection, but I want to (1) understand how to use symmetries, and why, given that the two mediums are separately invariant under continuous translation, should the k$$_{||}$$ remain unchanged and (2) how do Maxwell's equations imply conservation of frequency

The main theorem connecting symmetry and conservation laws is Noether's theorem. Generally, it states that a quantity of $$\left(\frac{\partial L}{\partial \dot{\mathbf{q}}} \cdot \dot{\mathbf{q}} - L \right) T_r - \frac{\partial L}{\partial \dot{\mathbf{q}}} \cdot \mathbf{Q}_r$$ is conserved under perturbations in time and generalized coordinates $$\mathbf{q}$$ ($$t \rightarrow t^{\prime} = t + \delta t, \mathbf{q} \rightarrow \mathbf{q}^{\prime} = \mathbf{q} + \delta \mathbf{q} ~)$$. The Langrangian $$L$$ should be conserved (symmetric). $$T_r, Q_r$$ are some functions describing the perturbations: $$\delta t = \sum_r \varepsilon_r T_r$$ $$\delta \mathbf{q} = \sum_r \varepsilon_r \mathbf{Q}_r ~$$
1) $$T=1, r=1, Q=0$$, so simple linear translation in time. Then the Noether's quantity reads: $$\frac{\partial L}{\partial \dot{\mathbf{q}}} \cdot \dot{\mathbf{q}} - L$$. This is basically formula of hamiltonian, i.e. total energy of a system.
2) $$T=0, r=1, Q=1$$, so simple linear translation in a space coordinate. Then the Noether's quantity reads: $$\frac{\partial L}{\partial \dot{q_k}}$$, which is a momentum.
Now, talking about light, we should remember wave-particle duality and consider photons with momentum and energy. Momentum is wavevector $$k$$ and energy $$\hbar \omega$$. Linear translation in time and space for a photon just means a phase shift that couldn't affect a Lagrangian so it is conserved. Consequently, we have corresponding wavevector and frequency conservation laws.